aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource/after-delombok
diff options
context:
space:
mode:
Diffstat (limited to 'test/transform/resource/after-delombok')
-rw-r--r--test/transform/resource/after-delombok/NonNullExistingConstructorOnRecord.java12
-rw-r--r--test/transform/resource/after-delombok/StandardExceptions.java36
2 files changed, 42 insertions, 6 deletions
diff --git a/test/transform/resource/after-delombok/NonNullExistingConstructorOnRecord.java b/test/transform/resource/after-delombok/NonNullExistingConstructorOnRecord.java
index 45364815..dec91261 100644
--- a/test/transform/resource/after-delombok/NonNullExistingConstructorOnRecord.java
+++ b/test/transform/resource/after-delombok/NonNullExistingConstructorOnRecord.java
@@ -1,12 +1,6 @@
// version 16:
import lombok.NonNull;
public record NonNullExistingConstructorOnRecord(@NonNull String a, @NonNull String b) {
- public NonNullExistingConstructorOnRecord(@NonNull String b) {
- this("default", b);
- if (b == null) {
- throw new java.lang.NullPointerException("b is marked non-null but is null");
- }
- }
@java.lang.SuppressWarnings("all")
public NonNullExistingConstructorOnRecord {
if (a == null) {
@@ -16,4 +10,10 @@ public record NonNullExistingConstructorOnRecord(@NonNull String a, @NonNull Str
throw new java.lang.NullPointerException("b is marked non-null but is null");
}
}
+ public NonNullExistingConstructorOnRecord(@NonNull String b) {
+ this("default", b);
+ if (b == null) {
+ throw new java.lang.NullPointerException("b is marked non-null but is null");
+ }
+ }
}
diff --git a/test/transform/resource/after-delombok/StandardExceptions.java b/test/transform/resource/after-delombok/StandardExceptions.java
new file mode 100644
index 00000000..d60fcaf2
--- /dev/null
+++ b/test/transform/resource/after-delombok/StandardExceptions.java
@@ -0,0 +1,36 @@
+class EmptyException extends Exception {
+ @java.lang.SuppressWarnings("all")
+ public EmptyException() {
+ this(null, null);
+ }
+ @java.lang.SuppressWarnings("all")
+ public EmptyException(final java.lang.String message) {
+ this(message, null);
+ }
+ @java.lang.SuppressWarnings("all")
+ public EmptyException(final java.lang.Throwable cause) {
+ this(cause != null ? cause.getMessage() : null, cause);
+ }
+ @java.lang.SuppressWarnings("all")
+ public EmptyException(final java.lang.String message, final java.lang.Throwable cause) {
+ super(message);
+ if (cause != null) super.initCause(cause);
+ }
+}
+class NoArgsException extends Exception {
+ public NoArgsException() {
+ }
+ @java.lang.SuppressWarnings("all")
+ protected NoArgsException(final java.lang.String message) {
+ this(message, null);
+ }
+ @java.lang.SuppressWarnings("all")
+ protected NoArgsException(final java.lang.Throwable cause) {
+ this(cause != null ? cause.getMessage() : null, cause);
+ }
+ @java.lang.SuppressWarnings("all")
+ protected NoArgsException(final java.lang.String message, final java.lang.Throwable cause) {
+ super(message);
+ if (cause != null) super.initCause(cause);
+ }
+} \ No newline at end of file