aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource/after-delombok
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2018-06-04 23:55:13 +0200
committerReinier Zwitserloot <reinier@zwitserloot.com>2018-06-04 23:55:13 +0200
commita0b901c3c04d0377f495a9da853196a3b0433eae (patch)
tree58e3e3ca4b3954e4e5eedd856cfc44d02381fa2b /test/transform/resource/after-delombok
parent198efc1b279060beba836663b802923b8d53b2ec (diff)
downloadlombok-a0b901c3c04d0377f495a9da853196a3b0433eae.tar.gz
lombok-a0b901c3c04d0377f495a9da853196a3b0433eae.tar.bz2
lombok-a0b901c3c04d0377f495a9da853196a3b0433eae.zip
`@NonNull` now uses a slightly longer exception message.
Diffstat (limited to 'test/transform/resource/after-delombok')
-rw-r--r--test/transform/resource/after-delombok/ConstructorsWithAccessors.java8
-rw-r--r--test/transform/resource/after-delombok/DataOnLocalClass.java4
-rw-r--r--test/transform/resource/after-delombok/NonNullOnParameter.java16
-rw-r--r--test/transform/resource/after-delombok/NonNullOnParameterAbstract.java2
-rw-r--r--test/transform/resource/after-delombok/NonNullOnParameterOfDefaultMethod.java2
-rw-r--r--test/transform/resource/after-delombok/NonNullPlain.java4
-rw-r--r--test/transform/resource/after-delombok/NonNullWithAlternateException.java4
-rw-r--r--test/transform/resource/after-delombok/NonNullWithSneakyThrows.java2
-rw-r--r--test/transform/resource/after-delombok/SetterOnClass.java2
-rw-r--r--test/transform/resource/after-delombok/WitherOnClass.java2
10 files changed, 23 insertions, 23 deletions
diff --git a/test/transform/resource/after-delombok/ConstructorsWithAccessors.java b/test/transform/resource/after-delombok/ConstructorsWithAccessors.java
index dd4ce12f..2e09b2df 100644
--- a/test/transform/resource/after-delombok/ConstructorsWithAccessors.java
+++ b/test/transform/resource/after-delombok/ConstructorsWithAccessors.java
@@ -26,16 +26,16 @@ class ConstructorsWithAccessorsNonNull {
@java.lang.SuppressWarnings("all")
public ConstructorsWithAccessorsNonNull(@lombok.NonNull final Integer plower, @lombok.NonNull final Integer upper, @lombok.NonNull final Integer huh, @lombok.NonNull final Integer _huh2) {
if (plower == null) {
- throw new java.lang.NullPointerException("plower");
+ throw new java.lang.NullPointerException("plower is marked @NonNull but is null");
}
if (upper == null) {
- throw new java.lang.NullPointerException("upper");
+ throw new java.lang.NullPointerException("upper is marked @NonNull but is null");
}
if (huh == null) {
- throw new java.lang.NullPointerException("huh");
+ throw new java.lang.NullPointerException("huh is marked @NonNull but is null");
}
if (_huh2 == null) {
- throw new java.lang.NullPointerException("_huh2");
+ throw new java.lang.NullPointerException("_huh2 is marked @NonNull but is null");
}
this.plower = plower;
this.pUpper = upper;
diff --git a/test/transform/resource/after-delombok/DataOnLocalClass.java b/test/transform/resource/after-delombok/DataOnLocalClass.java
index 84817897..d611490b 100644
--- a/test/transform/resource/after-delombok/DataOnLocalClass.java
+++ b/test/transform/resource/after-delombok/DataOnLocalClass.java
@@ -64,7 +64,7 @@ class DataOnLocalClass2 {
@java.lang.SuppressWarnings("all")
public InnerLocal(@lombok.NonNull final String name) {
if (name == null) {
- throw new java.lang.NullPointerException("name");
+ throw new java.lang.NullPointerException("name is marked @NonNull but is null");
}
this.name = name;
}
@@ -76,7 +76,7 @@ class DataOnLocalClass2 {
@java.lang.SuppressWarnings("all")
public void setName(@lombok.NonNull final String name) {
if (name == null) {
- throw new java.lang.NullPointerException("name");
+ throw new java.lang.NullPointerException("name is marked @NonNull but is null");
}
this.name = name;
}
diff --git a/test/transform/resource/after-delombok/NonNullOnParameter.java b/test/transform/resource/after-delombok/NonNullOnParameter.java
index a27d19c9..fa06e41b 100644
--- a/test/transform/resource/after-delombok/NonNullOnParameter.java
+++ b/test/transform/resource/after-delombok/NonNullOnParameter.java
@@ -2,22 +2,22 @@ class NonNullOnParameter extends Thread {
NonNullOnParameter(@lombok.NonNull String arg) {
this(arg, "");
if (arg == null) {
- throw new java.lang.NullPointerException("arg");
+ throw new java.lang.NullPointerException("arg is marked @NonNull but is null");
}
}
NonNullOnParameter(@lombok.NonNull String arg, @lombok.NonNull String arg2) {
super(arg);
if (arg2 == null) {
- throw new java.lang.NullPointerException("arg2");
+ throw new java.lang.NullPointerException("arg2 is marked @NonNull but is null");
}
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");
+ throw new java.lang.NullPointerException("arg is marked @NonNull but is null");
}
if (arg3 == null) {
- throw new java.lang.NullPointerException("arg3");
+ throw new java.lang.NullPointerException("arg3 is marked @NonNull but is null");
}
if (arg2 == null) {
throw new NullPointerException("arg2");
@@ -26,21 +26,21 @@ class NonNullOnParameter extends Thread {
}
public void test3(@lombok.NonNull String arg) {
if (arg == null) {
- throw new java.lang.NullPointerException("arg");
+ throw new java.lang.NullPointerException("arg is marked @NonNull but is null");
}
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");
+ throw new java.lang.NullPointerException("stringArg is marked @NonNull but is null");
}
if (arg2 == null) {
- throw new java.lang.NullPointerException("arg2");
+ throw new java.lang.NullPointerException("arg2 is marked @NonNull but is null");
}
}
public void test(@lombok.NonNull String arg) {
if (arg == null) {
- throw new java.lang.NullPointerException("arg");
+ throw new java.lang.NullPointerException("arg is marked @NonNull but is null");
}
System.out.println("Hey");
if (arg == null) throw new NullPointerException();
diff --git a/test/transform/resource/after-delombok/NonNullOnParameterAbstract.java b/test/transform/resource/after-delombok/NonNullOnParameterAbstract.java
index 62fd878a..a2dcb49c 100644
--- a/test/transform/resource/after-delombok/NonNullOnParameterAbstract.java
+++ b/test/transform/resource/after-delombok/NonNullOnParameterAbstract.java
@@ -1,7 +1,7 @@
abstract class NonNullOnParameterAbstract {
public void test(@lombok.NonNull String arg) {
if (arg == null) {
- throw new java.lang.NullPointerException("arg");
+ throw new java.lang.NullPointerException("arg is marked @NonNull but is null");
}
System.out.println("Hey");
}
diff --git a/test/transform/resource/after-delombok/NonNullOnParameterOfDefaultMethod.java b/test/transform/resource/after-delombok/NonNullOnParameterOfDefaultMethod.java
index e220296f..cf10253b 100644
--- a/test/transform/resource/after-delombok/NonNullOnParameterOfDefaultMethod.java
+++ b/test/transform/resource/after-delombok/NonNullOnParameterOfDefaultMethod.java
@@ -3,7 +3,7 @@ interface NonNullOnParameterOfDefaultMethod {
void test(@lombok.NonNull String arg);
default void test2(@lombok.NonNull String arg) {
if (arg == null) {
- throw new java.lang.NullPointerException("arg");
+ throw new java.lang.NullPointerException("arg is marked @NonNull but is null");
}
System.out.println(arg);
}
diff --git a/test/transform/resource/after-delombok/NonNullPlain.java b/test/transform/resource/after-delombok/NonNullPlain.java
index f6b8037e..d3de3dcf 100644
--- a/test/transform/resource/after-delombok/NonNullPlain.java
+++ b/test/transform/resource/after-delombok/NonNullPlain.java
@@ -13,7 +13,7 @@ class NonNullPlain {
@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");
+ throw new java.lang.NullPointerException("s is marked @NonNull but is null");
}
this.i = i;
this.s = s;
@@ -39,7 +39,7 @@ class NonNullPlain {
@java.lang.SuppressWarnings("all")
public void setS(@lombok.NonNull final String s) {
if (s == null) {
- throw new java.lang.NullPointerException("s");
+ throw new java.lang.NullPointerException("s is marked @NonNull but is null");
}
this.s = s;
}
diff --git a/test/transform/resource/after-delombok/NonNullWithAlternateException.java b/test/transform/resource/after-delombok/NonNullWithAlternateException.java
index 76c6406a..982da7d8 100644
--- a/test/transform/resource/after-delombok/NonNullWithAlternateException.java
+++ b/test/transform/resource/after-delombok/NonNullWithAlternateException.java
@@ -3,14 +3,14 @@ public class NonNullWithAlternateException {
private String test;
public void testMethod(@lombok.NonNull String arg) {
if (arg == null) {
- throw new java.lang.IllegalArgumentException("arg is null");
+ throw new java.lang.IllegalArgumentException("arg is marked @NonNull but is null");
}
System.out.println(arg);
}
@java.lang.SuppressWarnings("all")
public void setTest(@lombok.NonNull final String test) {
if (test == null) {
- throw new java.lang.IllegalArgumentException("test is null");
+ throw new java.lang.IllegalArgumentException("test is marked @NonNull but is null");
}
this.test = test;
}
diff --git a/test/transform/resource/after-delombok/NonNullWithSneakyThrows.java b/test/transform/resource/after-delombok/NonNullWithSneakyThrows.java
index 97de0d8a..5000f16d 100644
--- a/test/transform/resource/after-delombok/NonNullWithSneakyThrows.java
+++ b/test/transform/resource/after-delombok/NonNullWithSneakyThrows.java
@@ -2,7 +2,7 @@ class NonNullWithSneakyThrows {
void test(@lombok.NonNull String in) {
try {
if (in == null) {
- throw new java.lang.NullPointerException("in");
+ throw new java.lang.NullPointerException("in is marked @NonNull but is null");
}
System.out.println(in);
} catch (final java.lang.Throwable $ex) {
diff --git a/test/transform/resource/after-delombok/SetterOnClass.java b/test/transform/resource/after-delombok/SetterOnClass.java
index f2347bcb..f880e20b 100644
--- a/test/transform/resource/after-delombok/SetterOnClass.java
+++ b/test/transform/resource/after-delombok/SetterOnClass.java
@@ -54,7 +54,7 @@ class SetterOnClass6 {
@java.lang.SuppressWarnings("all")
public void setNonNull(@lombok.NonNull final String nonNull) {
if (nonNull == null) {
- throw new java.lang.NullPointerException("nonNull");
+ throw new java.lang.NullPointerException("nonNull is marked @NonNull but is null");
}
this.nonNull = nonNull;
}
diff --git a/test/transform/resource/after-delombok/WitherOnClass.java b/test/transform/resource/after-delombok/WitherOnClass.java
index 45d0c4b5..93309c89 100644
--- a/test/transform/resource/after-delombok/WitherOnClass.java
+++ b/test/transform/resource/after-delombok/WitherOnClass.java
@@ -36,7 +36,7 @@ class WitherOnClass3 {
@java.lang.SuppressWarnings("all")
public WitherOnClass3 withNonNull(@lombok.NonNull final String nonNull) {
if (nonNull == null) {
- throw new java.lang.NullPointerException("nonNull");
+ throw new java.lang.NullPointerException("nonNull is marked @NonNull but is null");
}
return this.nonNull == nonNull ? this : new WitherOnClass3(this.couldBeNull, nonNull);
}