aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource/before
diff options
context:
space:
mode:
Diffstat (limited to 'test/transform/resource/before')
-rw-r--r--test/transform/resource/before/BuilderWithNoBuilderMethod.java5
-rw-r--r--test/transform/resource/before/NonNullOnParameter.java9
-rw-r--r--test/transform/resource/before/NonNullWithAssertion.java13
3 files changed, 27 insertions, 0 deletions
diff --git a/test/transform/resource/before/BuilderWithNoBuilderMethod.java b/test/transform/resource/before/BuilderWithNoBuilderMethod.java
new file mode 100644
index 00000000..3f2b21ac
--- /dev/null
+++ b/test/transform/resource/before/BuilderWithNoBuilderMethod.java
@@ -0,0 +1,5 @@
+import lombok.Builder;
+@Builder(toBuilder = true, builderMethodName = "")
+class BuilderWithNoBuilderMethod {
+ private String a = "";
+}
diff --git a/test/transform/resource/before/NonNullOnParameter.java b/test/transform/resource/before/NonNullOnParameter.java
index 7eb4c565..22aceac7 100644
--- a/test/transform/resource/before/NonNullOnParameter.java
+++ b/test/transform/resource/before/NonNullOnParameter.java
@@ -27,4 +27,13 @@ class NonNullOnParameter extends Thread {
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/before/NonNullWithAssertion.java b/test/transform/resource/before/NonNullWithAssertion.java
new file mode 100644
index 00000000..c3d271a6
--- /dev/null
+++ b/test/transform/resource/before/NonNullWithAssertion.java
@@ -0,0 +1,13 @@
+//CONF: lombok.nonNull.exceptionType = Assertion
+
+public class NonNullWithAssertion {
+ @lombok.NonNull @lombok.Setter private String test;
+
+ public void testMethod(@lombok.NonNull String arg) {
+ System.out.println(arg);
+ }
+
+ public void testMethodWithIf(@lombok.NonNull String arg) {
+ if (arg == null) throw new NullPointerException("Oops");
+ }
+}