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/DataOnLocalClass.java8
-rw-r--r--test/transform/resource/after-delombok/NonNullOnParameter.java48
-rw-r--r--test/transform/resource/after-delombok/NonNullPlain.java8
-rw-r--r--test/transform/resource/after-delombok/SetterOnClass.java4
-rw-r--r--test/transform/resource/after-delombok/WitherOnClass.java4
5 files changed, 66 insertions, 6 deletions
diff --git a/test/transform/resource/after-delombok/DataOnLocalClass.java b/test/transform/resource/after-delombok/DataOnLocalClass.java
index ed4d30ca..abe2757b 100644
--- a/test/transform/resource/after-delombok/DataOnLocalClass.java
+++ b/test/transform/resource/after-delombok/DataOnLocalClass.java
@@ -63,7 +63,9 @@ class DataOnLocalClass2 {
String name;
@java.lang.SuppressWarnings("all")
public InnerLocal(@lombok.NonNull final String name) {
- if (name == null) throw new java.lang.NullPointerException("name");
+ if (name == null) {
+ throw new java.lang.NullPointerException("name");
+ }
this.name = name;
}
@lombok.NonNull
@@ -73,7 +75,9 @@ class DataOnLocalClass2 {
}
@java.lang.SuppressWarnings("all")
public void setName(@lombok.NonNull final String name) {
- if (name == null) throw new java.lang.NullPointerException("name");
+ if (name == null) {
+ throw new java.lang.NullPointerException("name");
+ }
this.name = name;
}
@java.lang.Override
diff --git a/test/transform/resource/after-delombok/NonNullOnParameter.java b/test/transform/resource/after-delombok/NonNullOnParameter.java
new file mode 100644
index 00000000..a27d19c9
--- /dev/null
+++ b/test/transform/resource/after-delombok/NonNullOnParameter.java
@@ -0,0 +1,48 @@
+class NonNullOnParameter extends Thread {
+ NonNullOnParameter(@lombok.NonNull String arg) {
+ this(arg, "");
+ if (arg == null) {
+ throw new java.lang.NullPointerException("arg");
+ }
+ }
+ NonNullOnParameter(@lombok.NonNull String arg, @lombok.NonNull String arg2) {
+ super(arg);
+ if (arg2 == null) {
+ throw new java.lang.NullPointerException("arg2");
+ }
+ if (arg == null) throw new NullPointerException();
+ }
+ public void test2(@lombok.NonNull String arg, @lombok.NonNull String arg2, @lombok.NonNull String arg3) {
+ if (arg == null) {
+ throw new java.lang.NullPointerException("arg");
+ }
+ if (arg3 == null) {
+ throw new java.lang.NullPointerException("arg3");
+ }
+ if (arg2 == null) {
+ throw new NullPointerException("arg2");
+ }
+ if (arg == null) System.out.println("Hello");
+ }
+ public void test3(@lombok.NonNull String arg) {
+ if (arg == null) {
+ throw new java.lang.NullPointerException("arg");
+ }
+ if (arg != null) throw new IllegalStateException();
+ }
+ public void test(@lombok.NonNull String stringArg, @lombok.NonNull String arg2, @lombok.NonNull int primitiveArg) {
+ if (stringArg == null) {
+ throw new java.lang.NullPointerException("stringArg");
+ }
+ if (arg2 == null) {
+ throw new java.lang.NullPointerException("arg2");
+ }
+ }
+ public void test(@lombok.NonNull String arg) {
+ if (arg == null) {
+ throw new java.lang.NullPointerException("arg");
+ }
+ System.out.println("Hey");
+ if (arg == null) throw new NullPointerException();
+ }
+}
diff --git a/test/transform/resource/after-delombok/NonNullPlain.java b/test/transform/resource/after-delombok/NonNullPlain.java
index 064e00b9..6b85cbf7 100644
--- a/test/transform/resource/after-delombok/NonNullPlain.java
+++ b/test/transform/resource/after-delombok/NonNullPlain.java
@@ -16,7 +16,9 @@ class NonNullPlain {
@java.beans.ConstructorProperties({"i", "s"})
@java.lang.SuppressWarnings("all")
public NonNullPlain(@lombok.NonNull final int i, @lombok.NonNull final String s) {
- if (s == null) throw new java.lang.NullPointerException("s");
+ if (s == null) {
+ throw new java.lang.NullPointerException("s");
+ }
this.i = i;
this.s = s;
}
@@ -45,7 +47,9 @@ class NonNullPlain {
@java.lang.SuppressWarnings("all")
public void setS(@lombok.NonNull final String s) {
- if (s == null) throw new java.lang.NullPointerException("s");
+ if (s == null) {
+ throw new java.lang.NullPointerException("s");
+ }
this.s = s;
}
diff --git a/test/transform/resource/after-delombok/SetterOnClass.java b/test/transform/resource/after-delombok/SetterOnClass.java
index 151bc179..7077c492 100644
--- a/test/transform/resource/after-delombok/SetterOnClass.java
+++ b/test/transform/resource/after-delombok/SetterOnClass.java
@@ -53,7 +53,9 @@ class SetterOnClass6 {
}
@java.lang.SuppressWarnings("all")
public void setNonNull(@lombok.NonNull final String nonNull) {
- if (nonNull == null) throw new java.lang.NullPointerException("nonNull");
+ if (nonNull == null) {
+ throw new java.lang.NullPointerException("nonNull");
+ }
this.nonNull = nonNull;
}
} \ No newline at end of file
diff --git a/test/transform/resource/after-delombok/WitherOnClass.java b/test/transform/resource/after-delombok/WitherOnClass.java
index 783fede1..45d0c4b5 100644
--- a/test/transform/resource/after-delombok/WitherOnClass.java
+++ b/test/transform/resource/after-delombok/WitherOnClass.java
@@ -35,7 +35,9 @@ class WitherOnClass3 {
}
@java.lang.SuppressWarnings("all")
public WitherOnClass3 withNonNull(@lombok.NonNull final String nonNull) {
- if (nonNull == null) throw new java.lang.NullPointerException("nonNull");
+ if (nonNull == null) {
+ throw new java.lang.NullPointerException("nonNull");
+ }
return this.nonNull == nonNull ? this : new WitherOnClass3(this.couldBeNull, nonNull);
}
}