aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource/after-delombok/NonNullWithAssertion.java
diff options
context:
space:
mode:
Diffstat (limited to 'test/transform/resource/after-delombok/NonNullWithAssertion.java')
-rw-r--r--test/transform/resource/after-delombok/NonNullWithAssertion.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/transform/resource/after-delombok/NonNullWithAssertion.java b/test/transform/resource/after-delombok/NonNullWithAssertion.java
new file mode 100644
index 00000000..15dc0254
--- /dev/null
+++ b/test/transform/resource/after-delombok/NonNullWithAssertion.java
@@ -0,0 +1,16 @@
+public class NonNullWithAssertion {
+ @lombok.NonNull
+ private String test;
+ 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");
+ }
+ @java.lang.SuppressWarnings("all")
+ public void setTest(@lombok.NonNull final String test) {
+ assert test != null : "test is marked non-null but is null";
+ this.test = test;
+ }
+} \ No newline at end of file