diff options
author | Reinier Zwitserloot <reinier@zwitserloot.com> | 2018-06-04 23:55:13 +0200 |
---|---|---|
committer | Reinier Zwitserloot <reinier@zwitserloot.com> | 2018-06-04 23:55:13 +0200 |
commit | a0b901c3c04d0377f495a9da853196a3b0433eae (patch) | |
tree | 58e3e3ca4b3954e4e5eedd856cfc44d02381fa2b /test/transform/resource | |
parent | 198efc1b279060beba836663b802923b8d53b2ec (diff) | |
download | lombok-a0b901c3c04d0377f495a9da853196a3b0433eae.tar.gz lombok-a0b901c3c04d0377f495a9da853196a3b0433eae.tar.bz2 lombok-a0b901c3c04d0377f495a9da853196a3b0433eae.zip |
`@NonNull` now uses a slightly longer exception message.
Diffstat (limited to 'test/transform/resource')
20 files changed, 46 insertions, 46 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); } diff --git a/test/transform/resource/after-ecj/ConstructorsWithAccessors.java b/test/transform/resource/after-ecj/ConstructorsWithAccessors.java index 301e6132..6050ab9f 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"); + 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-ecj/DataOnLocalClass.java b/test/transform/resource/after-ecj/DataOnLocalClass.java index 341df49b..ff2a3d20 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"); + throw new java.lang.NullPointerException("name is marked @NonNull but is null"); } this.name = name; } @@ -99,7 +99,7 @@ class DataOnLocalClass2 { super(); 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-ecj/NonNullOnParameter.java b/test/transform/resource/after-ecj/NonNullOnParameter.java index bbceb153..fde47e1d 100644 --- a/test/transform/resource/after-ecj/NonNullOnParameter.java +++ b/test/transform/resource/after-ecj/NonNullOnParameter.java @@ -3,14 +3,14 @@ class NonNullOnParameter extends Thread { 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(); @@ -18,11 +18,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"); + 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)) { @@ -34,7 +34,7 @@ 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(); @@ -42,17 +42,17 @@ 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"); + 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)) diff --git a/test/transform/resource/after-ecj/NonNullOnParameterAbstract.java b/test/transform/resource/after-ecj/NonNullOnParameterAbstract.java index a7dae247..d3e1fdd6 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"); + throw new java.lang.NullPointerException("arg is marked @NonNull 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 85e99702..7293bcf5 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"); + throw new java.lang.NullPointerException("arg is marked @NonNull 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 9edb576b..c703f38a 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"); + throw new java.lang.NullPointerException("s is marked @NonNull 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"); + throw new java.lang.NullPointerException("s is marked @NonNull but is null"); } this.s = s; } diff --git a/test/transform/resource/after-ecj/NonNullWithAlternateException.java b/test/transform/resource/after-ecj/NonNullWithAlternateException.java index 8a547ecf..39e9c0a8 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 null"); + throw new java.lang.IllegalArgumentException("arg is marked @NonNull 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 null"); + throw new java.lang.IllegalArgumentException("test is marked @NonNull but is null"); } this.test = test; } diff --git a/test/transform/resource/after-ecj/NonNullWithSneakyThrows.java b/test/transform/resource/after-ecj/NonNullWithSneakyThrows.java index 1a57be29..22799b5e 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"); + throw new java.lang.NullPointerException("in is marked @NonNull 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 aa3459bb..c7aec900 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"); + throw new java.lang.NullPointerException("nonNull is marked @NonNull but is null"); } this.nonNull = nonNull; } diff --git a/test/transform/resource/after-ecj/WitherOnClass.java b/test/transform/resource/after-ecj/WitherOnClass.java index 82132e87..086ba591 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"); + throw new java.lang.NullPointerException("nonNull is marked @NonNull but is null"); } return ((this.nonNull == nonNull) ? this : new WitherOnClass3(this.couldBeNull, nonNull)); } |