aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource/after-ecj
diff options
context:
space:
mode:
Diffstat (limited to 'test/transform/resource/after-ecj')
-rw-r--r--test/transform/resource/after-ecj/BuilderSingularAnnotatedTypes.java6
-rw-r--r--test/transform/resource/after-ecj/BuilderWithNoBuilderMethod.java27
-rw-r--r--test/transform/resource/after-ecj/ConstructorsWithAccessors.java8
-rw-r--r--test/transform/resource/after-ecj/DataOnLocalClass.java4
-rw-r--r--test/transform/resource/after-ecj/NonNullOnParameter.java24
-rw-r--r--test/transform/resource/after-ecj/NonNullOnParameterAbstract.java2
-rw-r--r--test/transform/resource/after-ecj/NonNullOnParameterOfDefaultMethod.java2
-rw-r--r--test/transform/resource/after-ecj/NonNullPlain.java4
-rw-r--r--test/transform/resource/after-ecj/NonNullTypeUse.java10
-rw-r--r--test/transform/resource/after-ecj/NonNullWithAlternateException.java4
-rw-r--r--test/transform/resource/after-ecj/NonNullWithAssertion.java18
-rw-r--r--test/transform/resource/after-ecj/NonNullWithSneakyThrows.java2
-rw-r--r--test/transform/resource/after-ecj/SetterOnClass.java2
-rw-r--r--test/transform/resource/after-ecj/SuperBuilderSingularAnnotatedTypes.java6
-rw-r--r--test/transform/resource/after-ecj/SuperBuilderWithNonNull.java4
-rw-r--r--test/transform/resource/after-ecj/WitherOnClass.java2
16 files changed, 89 insertions, 36 deletions
diff --git a/test/transform/resource/after-ecj/BuilderSingularAnnotatedTypes.java b/test/transform/resource/after-ecj/BuilderSingularAnnotatedTypes.java
index 26023e1a..511c153a 100644
--- a/test/transform/resource/after-ecj/BuilderSingularAnnotatedTypes.java
+++ b/test/transform/resource/after-ecj/BuilderSingularAnnotatedTypes.java
@@ -17,7 +17,7 @@ import lombok.Singular;
public @java.lang.SuppressWarnings("all") BuilderSingularAnnotatedTypesBuilder foo(final @MyAnnotation @NonNull String foo) {
if ((foo == null))
{
- throw new java.lang.NullPointerException("foo is marked @NonNull but is null");
+ throw new java.lang.NullPointerException("foo is marked non-null but is null");
}
if ((this.foos == null))
this.foos = new java.util.ArrayList<@MyAnnotation @NonNull String>();
@@ -38,11 +38,11 @@ import lombok.Singular;
public @java.lang.SuppressWarnings("all") BuilderSingularAnnotatedTypesBuilder bar(final @MyAnnotation @NonNull String barKey, final @MyAnnotation @NonNull Integer barValue) {
if ((barKey == null))
{
- throw new java.lang.NullPointerException("barKey is marked @NonNull but is null");
+ throw new java.lang.NullPointerException("barKey is marked non-null but is null");
}
if ((barValue == null))
{
- throw new java.lang.NullPointerException("barValue is marked @NonNull but is null");
+ throw new java.lang.NullPointerException("barValue is marked non-null but is null");
}
if ((this.bars$key == null))
{
diff --git a/test/transform/resource/after-ecj/BuilderWithNoBuilderMethod.java b/test/transform/resource/after-ecj/BuilderWithNoBuilderMethod.java
new file mode 100644
index 00000000..624b14b9
--- /dev/null
+++ b/test/transform/resource/after-ecj/BuilderWithNoBuilderMethod.java
@@ -0,0 +1,27 @@
+import lombok.Builder;
+@Builder(toBuilder = true,builderMethodName = "") class BuilderWithNoBuilderMethod {
+ public static @java.lang.SuppressWarnings("all") class BuilderWithNoBuilderMethodBuilder {
+ private @java.lang.SuppressWarnings("all") String a;
+ @java.lang.SuppressWarnings("all") BuilderWithNoBuilderMethodBuilder() {
+ super();
+ }
+ public @java.lang.SuppressWarnings("all") BuilderWithNoBuilderMethodBuilder a(final String a) {
+ this.a = a;
+ return this;
+ }
+ public @java.lang.SuppressWarnings("all") BuilderWithNoBuilderMethod build() {
+ return new BuilderWithNoBuilderMethod(a);
+ }
+ public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() {
+ return (("BuilderWithNoBuilderMethod.BuilderWithNoBuilderMethodBuilder(a=" + this.a) + ")");
+ }
+ }
+ private String a = "";
+ @java.lang.SuppressWarnings("all") BuilderWithNoBuilderMethod(final String a) {
+ super();
+ this.a = a;
+ }
+ public @java.lang.SuppressWarnings("all") BuilderWithNoBuilderMethodBuilder toBuilder() {
+ return new BuilderWithNoBuilderMethodBuilder().a(this.a);
+ }
+}
diff --git a/test/transform/resource/after-ecj/ConstructorsWithAccessors.java b/test/transform/resource/after-ecj/ConstructorsWithAccessors.java
index 6050ab9f..552c5c2d 100644
--- a/test/transform/resource/after-ecj/ConstructorsWithAccessors.java
+++ b/test/transform/resource/after-ecj/ConstructorsWithAccessors.java
@@ -20,19 +20,19 @@
super();
if ((plower == null))
{
- throw new java.lang.NullPointerException("plower is marked @NonNull but is null");
+ throw new java.lang.NullPointerException("plower is marked non-null but is null");
}
if ((upper == null))
{
- throw new java.lang.NullPointerException("upper is marked @NonNull but is null");
+ throw new java.lang.NullPointerException("upper is marked non-null but is null");
}
if ((huh == null))
{
- throw new java.lang.NullPointerException("huh is marked @NonNull but is null");
+ throw new java.lang.NullPointerException("huh is marked non-null but is null");
}
if ((_huh2 == null))
{
- throw new java.lang.NullPointerException("_huh2 is marked @NonNull but is null");
+ throw new java.lang.NullPointerException("_huh2 is marked non-null but is null");
}
this.plower = plower;
this.pUpper = upper;
diff --git a/test/transform/resource/after-ecj/DataOnLocalClass.java b/test/transform/resource/after-ecj/DataOnLocalClass.java
index ff2a3d20..ae986676 100644
--- a/test/transform/resource/after-ecj/DataOnLocalClass.java
+++ b/test/transform/resource/after-ecj/DataOnLocalClass.java
@@ -64,7 +64,7 @@ class DataOnLocalClass2 {
public @java.lang.SuppressWarnings("all") void setName(final @lombok.NonNull String name) {
if ((name == null))
{
- throw new java.lang.NullPointerException("name is marked @NonNull but is null");
+ throw new java.lang.NullPointerException("name is marked non-null but is null");
}
this.name = name;
}
@@ -99,7 +99,7 @@ class DataOnLocalClass2 {
super();
if ((name == null))
{
- throw new java.lang.NullPointerException("name is marked @NonNull but is null");
+ throw new java.lang.NullPointerException("name is marked non-null but is null");
}
this.name = name;
}
diff --git a/test/transform/resource/after-ecj/NonNullOnParameter.java b/test/transform/resource/after-ecj/NonNullOnParameter.java
index fde47e1d..4f873ab6 100644
--- a/test/transform/resource/after-ecj/NonNullOnParameter.java
+++ b/test/transform/resource/after-ecj/NonNullOnParameter.java
@@ -1,16 +1,18 @@
class NonNullOnParameter extends Thread {
+ <clinit>() {
+ }
NonNullOnParameter(@lombok.NonNull String arg) {
this(arg, "");
if ((arg == null))
{
- throw new java.lang.NullPointerException("arg is marked @NonNull but is null");
+ throw new java.lang.NullPointerException("arg is marked non-null but is null");
}
}
NonNullOnParameter(@lombok.NonNull String arg, @lombok.NonNull String arg2) {
super(arg);
if ((arg2 == null))
{
- throw new java.lang.NullPointerException("arg2 is marked @NonNull but is null");
+ throw new java.lang.NullPointerException("arg2 is marked non-null but is null");
}
if ((arg == null))
throw new NullPointerException();
@@ -18,11 +20,11 @@ class NonNullOnParameter extends Thread {
public void test2(@lombok.NonNull String arg, @lombok.NonNull String arg2, @lombok.NonNull String arg3) {
if ((arg == null))
{
- throw new java.lang.NullPointerException("arg is marked @NonNull but is null");
+ throw new java.lang.NullPointerException("arg is marked non-null but is null");
}
if ((arg3 == null))
{
- throw new java.lang.NullPointerException("arg3 is marked @NonNull but is null");
+ throw new java.lang.NullPointerException("arg3 is marked non-null but is null");
}
if ((arg2 == null))
{
@@ -34,7 +36,7 @@ class NonNullOnParameter extends Thread {
public void test3(@lombok.NonNull String arg) {
if ((arg == null))
{
- throw new java.lang.NullPointerException("arg is marked @NonNull but is null");
+ throw new java.lang.NullPointerException("arg is marked non-null but is null");
}
if ((arg != null))
throw new IllegalStateException();
@@ -42,20 +44,26 @@ class NonNullOnParameter extends Thread {
public void test(@lombok.NonNull String stringArg, @lombok.NonNull String arg2, @lombok.NonNull int primitiveArg) {
if ((stringArg == null))
{
- throw new java.lang.NullPointerException("stringArg is marked @NonNull but is null");
+ throw new java.lang.NullPointerException("stringArg is marked non-null but is null");
}
if ((arg2 == null))
{
- throw new java.lang.NullPointerException("arg2 is marked @NonNull but is null");
+ throw new java.lang.NullPointerException("arg2 is marked non-null but is null");
}
}
public void test(@lombok.NonNull String arg) {
if ((arg == null))
{
- throw new java.lang.NullPointerException("arg is marked @NonNull but is null");
+ throw new java.lang.NullPointerException("arg is marked non-null but is null");
}
System.out.println("Hey");
if ((arg == null))
throw new NullPointerException();
}
+ public void testWithAssert(@lombok.NonNull String param) {
+ assert (param != null);
+ }
+ public void testWithAssertAndMessage(@lombok.NonNull String param) {
+ assert (param != null): "Oops";
+ }
} \ No newline at end of file
diff --git a/test/transform/resource/after-ecj/NonNullOnParameterAbstract.java b/test/transform/resource/after-ecj/NonNullOnParameterAbstract.java
index d3e1fdd6..cc8ddcaa 100644
--- a/test/transform/resource/after-ecj/NonNullOnParameterAbstract.java
+++ b/test/transform/resource/after-ecj/NonNullOnParameterAbstract.java
@@ -5,7 +5,7 @@ abstract class NonNullOnParameterAbstract {
public void test(@lombok.NonNull String arg) {
if ((arg == null))
{
- throw new java.lang.NullPointerException("arg is marked @NonNull but is null");
+ throw new java.lang.NullPointerException("arg is marked non-null but is null");
}
System.out.println("Hey");
}
diff --git a/test/transform/resource/after-ecj/NonNullOnParameterOfDefaultMethod.java b/test/transform/resource/after-ecj/NonNullOnParameterOfDefaultMethod.java
index 7293bcf5..830cff13 100644
--- a/test/transform/resource/after-ecj/NonNullOnParameterOfDefaultMethod.java
+++ b/test/transform/resource/after-ecj/NonNullOnParameterOfDefaultMethod.java
@@ -3,7 +3,7 @@ interface NonNullOnParameterOfDefaultMethod {
default void test2(@lombok.NonNull String arg) {
if ((arg == null))
{
- throw new java.lang.NullPointerException("arg is marked @NonNull but is null");
+ throw new java.lang.NullPointerException("arg is marked non-null but is null");
}
System.out.println(arg);
}
diff --git a/test/transform/resource/after-ecj/NonNullPlain.java b/test/transform/resource/after-ecj/NonNullPlain.java
index c703f38a..bf43cb7f 100644
--- a/test/transform/resource/after-ecj/NonNullPlain.java
+++ b/test/transform/resource/after-ecj/NonNullPlain.java
@@ -9,7 +9,7 @@ import java.lang.annotation.*;
super();
if ((s == null))
{
- throw new java.lang.NullPointerException("s is marked @NonNull but is null");
+ throw new java.lang.NullPointerException("s is marked non-null but is null");
}
this.i = i;
this.s = s;
@@ -29,7 +29,7 @@ import java.lang.annotation.*;
public @java.lang.SuppressWarnings("all") void setS(final @lombok.NonNull String s) {
if ((s == null))
{
- throw new java.lang.NullPointerException("s is marked @NonNull but is null");
+ throw new java.lang.NullPointerException("s is marked non-null but is null");
}
this.s = s;
}
diff --git a/test/transform/resource/after-ecj/NonNullTypeUse.java b/test/transform/resource/after-ecj/NonNullTypeUse.java
index 4cf1aa5a..add140ea 100644
--- a/test/transform/resource/after-ecj/NonNullTypeUse.java
+++ b/test/transform/resource/after-ecj/NonNullTypeUse.java
@@ -6,13 +6,13 @@ class NonNullTypeUse {
void test1(@NonNull String[][][] args) {
if ((args == null))
{
- throw new java.lang.NullPointerException("args is marked @NonNull but is null");
+ throw new java.lang.NullPointerException("args is marked non-null but is null");
}
}
void test2(String @NonNull [][][] args) {
if ((args == null))
{
- throw new java.lang.NullPointerException("args is marked @NonNull but is null");
+ throw new java.lang.NullPointerException("args is marked non-null but is null");
}
}
void test3(String[] @NonNull [][] args) {
@@ -22,19 +22,19 @@ class NonNullTypeUse {
void test5(@NonNull String simple) {
if ((simple == null))
{
- throw new java.lang.NullPointerException("simple is marked @NonNull but is null");
+ throw new java.lang.NullPointerException("simple is marked non-null but is null");
}
}
void test6(java.lang.@NonNull String weird) {
if ((weird == null))
{
- throw new java.lang.NullPointerException("weird is marked @NonNull but is null");
+ throw new java.lang.NullPointerException("weird is marked non-null but is null");
}
}
void test7(java.lang.String @NonNull [][] weird) {
if ((weird == null))
{
- throw new java.lang.NullPointerException("weird is marked @NonNull but is null");
+ throw new java.lang.NullPointerException("weird is marked non-null but is null");
}
}
} \ No newline at end of file
diff --git a/test/transform/resource/after-ecj/NonNullWithAlternateException.java b/test/transform/resource/after-ecj/NonNullWithAlternateException.java
index 39e9c0a8..9a2a4e3d 100644
--- a/test/transform/resource/after-ecj/NonNullWithAlternateException.java
+++ b/test/transform/resource/after-ecj/NonNullWithAlternateException.java
@@ -6,14 +6,14 @@ public class NonNullWithAlternateException {
public void testMethod(@lombok.NonNull String arg) {
if ((arg == null))
{
- throw new java.lang.IllegalArgumentException("arg is marked @NonNull but is null");
+ throw new java.lang.IllegalArgumentException("arg is marked non-null but is null");
}
System.out.println(arg);
}
public @java.lang.SuppressWarnings("all") void setTest(final @lombok.NonNull String test) {
if ((test == null))
{
- throw new java.lang.IllegalArgumentException("test is marked @NonNull but is null");
+ throw new java.lang.IllegalArgumentException("test is marked non-null but is null");
}
this.test = test;
}
diff --git a/test/transform/resource/after-ecj/NonNullWithAssertion.java b/test/transform/resource/after-ecj/NonNullWithAssertion.java
new file mode 100644
index 00000000..d6f2b0f1
--- /dev/null
+++ b/test/transform/resource/after-ecj/NonNullWithAssertion.java
@@ -0,0 +1,18 @@
+public class NonNullWithAssertion {
+ private @lombok.NonNull @lombok.Setter String test;
+ public NonNullWithAssertion() {
+ super();
+ }
+ public void testMethod(@lombok.NonNull String arg) {
+ assert (arg != null): "arg is marked non-null but is null";
+ System.out.println(arg);
+ }
+ public void testMethodWithIf(@lombok.NonNull String arg) {
+ if ((arg == null))
+ throw new NullPointerException("Oops");
+ }
+ public @java.lang.SuppressWarnings("all") void setTest(final @lombok.NonNull String test) {
+ assert (test != null): "test is marked non-null but is null";
+ this.test = test;
+ }
+} \ No newline at end of file
diff --git a/test/transform/resource/after-ecj/NonNullWithSneakyThrows.java b/test/transform/resource/after-ecj/NonNullWithSneakyThrows.java
index 22799b5e..ee08dbf8 100644
--- a/test/transform/resource/after-ecj/NonNullWithSneakyThrows.java
+++ b/test/transform/resource/after-ecj/NonNullWithSneakyThrows.java
@@ -7,7 +7,7 @@ class NonNullWithSneakyThrows {
{
if ((in == null))
{
- throw new java.lang.NullPointerException("in is marked @NonNull but is null");
+ throw new java.lang.NullPointerException("in is marked non-null but is null");
}
System.out.println(in);
}
diff --git a/test/transform/resource/after-ecj/SetterOnClass.java b/test/transform/resource/after-ecj/SetterOnClass.java
index c7aec900..9ed77bd4 100644
--- a/test/transform/resource/after-ecj/SetterOnClass.java
+++ b/test/transform/resource/after-ecj/SetterOnClass.java
@@ -64,7 +64,7 @@
public @java.lang.SuppressWarnings("all") void setNonNull(final @lombok.NonNull String nonNull) {
if ((nonNull == null))
{
- throw new java.lang.NullPointerException("nonNull is marked @NonNull but is null");
+ throw new java.lang.NullPointerException("nonNull is marked non-null but is null");
}
this.nonNull = nonNull;
}
diff --git a/test/transform/resource/after-ecj/SuperBuilderSingularAnnotatedTypes.java b/test/transform/resource/after-ecj/SuperBuilderSingularAnnotatedTypes.java
index bb02024d..9b89f2a8 100644
--- a/test/transform/resource/after-ecj/SuperBuilderSingularAnnotatedTypes.java
+++ b/test/transform/resource/after-ecj/SuperBuilderSingularAnnotatedTypes.java
@@ -19,7 +19,7 @@ import lombok.Singular;
public @java.lang.SuppressWarnings("all") B foo(final @MyAnnotation @NonNull String foo) {
if ((foo == null))
{
- throw new java.lang.NullPointerException("foo is marked @NonNull but is null");
+ throw new java.lang.NullPointerException("foo is marked non-null but is null");
}
if ((this.foos == null))
this.foos = new java.util.ArrayList<@MyAnnotation @NonNull String>();
@@ -40,11 +40,11 @@ import lombok.Singular;
public @java.lang.SuppressWarnings("all") B bar(final @MyAnnotation @NonNull String barKey, final @MyAnnotation @NonNull Integer barValue) {
if ((barKey == null))
{
- throw new java.lang.NullPointerException("barKey is marked @NonNull but is null");
+ throw new java.lang.NullPointerException("barKey is marked non-null but is null");
}
if ((barValue == null))
{
- throw new java.lang.NullPointerException("barValue is marked @NonNull but is null");
+ throw new java.lang.NullPointerException("barValue is marked non-null but is null");
}
if ((this.bars$key == null))
{
diff --git a/test/transform/resource/after-ecj/SuperBuilderWithNonNull.java b/test/transform/resource/after-ecj/SuperBuilderWithNonNull.java
index 1c4bd53d..4b5cb188 100644
--- a/test/transform/resource/after-ecj/SuperBuilderWithNonNull.java
+++ b/test/transform/resource/after-ecj/SuperBuilderWithNonNull.java
@@ -41,7 +41,7 @@ public class SuperBuilderWithNonNull {
this.nonNullParentField = Parent.$default$nonNullParentField();
if ((nonNullParentField == null))
{
- throw new java.lang.NullPointerException("nonNullParentField is marked @NonNull but is null");
+ throw new java.lang.NullPointerException("nonNullParentField is marked non-null but is null");
}
}
public static @java.lang.SuppressWarnings("all") ParentBuilder<?, ?> builder() {
@@ -81,7 +81,7 @@ public class SuperBuilderWithNonNull {
this.nonNullChildField = b.nonNullChildField;
if ((nonNullChildField == null))
{
- throw new java.lang.NullPointerException("nonNullChildField is marked @NonNull but is null");
+ throw new java.lang.NullPointerException("nonNullChildField is marked non-null but is null");
}
}
public static @java.lang.SuppressWarnings("all") ChildBuilder<?, ?> builder() {
diff --git a/test/transform/resource/after-ecj/WitherOnClass.java b/test/transform/resource/after-ecj/WitherOnClass.java
index 086ba591..166d1842 100644
--- a/test/transform/resource/after-ecj/WitherOnClass.java
+++ b/test/transform/resource/after-ecj/WitherOnClass.java
@@ -34,7 +34,7 @@
public @java.lang.SuppressWarnings("all") WitherOnClass3 withNonNull(final @lombok.NonNull String nonNull) {
if ((nonNull == null))
{
- throw new java.lang.NullPointerException("nonNull is marked @NonNull but is null");
+ throw new java.lang.NullPointerException("nonNull is marked non-null but is null");
}
return ((this.nonNull == nonNull) ? this : new WitherOnClass3(this.couldBeNull, nonNull));
}