aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource/before
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2014-05-23 04:07:39 +0200
committerReinier Zwitserloot <reinier@zwitserloot.com>2014-05-23 04:07:39 +0200
commit4b878f9ba996f852ce555c3024512ae34e34774e (patch)
tree51ac37ecbb2e5f35b62523f9eec896211f758072 /test/transform/resource/before
parent57c92478a92360a1d1547794d5a5d0b5393f59f6 (diff)
downloadlombok-4b878f9ba996f852ce555c3024512ae34e34774e.tar.gz
lombok-4b878f9ba996f852ce555c3024512ae34e34774e.tar.bz2
lombok-4b878f9ba996f852ce555c3024512ae34e34774e.zip
Added confkey to make @NonNull generate a different exception because of the IllegalArgumentException vs. NullPointerException that we really don’t want to get into.
Diffstat (limited to 'test/transform/resource/before')
-rw-r--r--test/transform/resource/before/NonNullWithAlternateException.java9
-rw-r--r--test/transform/resource/before/NonNullWithMistypedException.java7
2 files changed, 16 insertions, 0 deletions
diff --git a/test/transform/resource/before/NonNullWithAlternateException.java b/test/transform/resource/before/NonNullWithAlternateException.java
new file mode 100644
index 00000000..780afc39
--- /dev/null
+++ b/test/transform/resource/before/NonNullWithAlternateException.java
@@ -0,0 +1,9 @@
+//CONF: lombok.nonNull.exceptionType = java.lang.IllegalArgumentException
+
+public class NonNullWithAlternateException {
+ @lombok.NonNull @lombok.Setter private String test;
+
+ public void testMethod(@lombok.NonNull String arg) {
+ System.out.println(arg);
+ }
+}
diff --git a/test/transform/resource/before/NonNullWithMistypedException.java b/test/transform/resource/before/NonNullWithMistypedException.java
new file mode 100644
index 00000000..6e1fb880
--- /dev/null
+++ b/test/transform/resource/before/NonNullWithMistypedException.java
@@ -0,0 +1,7 @@
+//CONF: lombok.nonNull.exceptionType = 12345
+//skip compare content: Just testing appropriate generation of error message.
+
+@lombok.Data
+public class NonNullWithMistypedException {
+ private @lombok.NonNull String test;
+}