diff options
Diffstat (limited to 'test/transform/resource/after-delombok/NonNullWithGuava.java')
-rw-r--r-- | test/transform/resource/after-delombok/NonNullWithGuava.java | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/test/transform/resource/after-delombok/NonNullWithGuava.java b/test/transform/resource/after-delombok/NonNullWithGuava.java new file mode 100644 index 00000000..b3c13d30 --- /dev/null +++ b/test/transform/resource/after-delombok/NonNullWithGuava.java @@ -0,0 +1,35 @@ +import static com.google.common.base.Preconditions.*; +public class NonNullWithGuava { + @lombok.NonNull + private String test; + public void testMethod(@lombok.NonNull String arg) { + com.google.common.base.Preconditions.checkNotNull(arg, "arg is marked non-null but is null"); + System.out.println(arg); + } + public void testMethodWithCheck1(@lombok.NonNull String arg) { + checkNotNull(arg); + } + public void testMethodWithCheckAssign(@lombok.NonNull String arg) { + test = checkNotNull(arg); + } + public void testMethodWithCheck2(@lombok.NonNull String arg) { + com.google.common.base.Preconditions.checkNotNull(arg); + } + public void testMethodWithFakeCheck1(@lombok.NonNull String arg) { + com.google.common.base.Preconditions.checkNotNull(arg, "arg is marked non-null but is null"); + checkNotNull(""); + } + public void testMethodWithFakeCheck2(@lombok.NonNull String arg) { + com.google.common.base.Preconditions.checkNotNull(arg, "arg is marked non-null but is null"); + com.google.common.base.Preconditions.checkNotNull(test); + } + public void testMethodWithFakeCheckAssign(@lombok.NonNull String arg) { + com.google.common.base.Preconditions.checkNotNull(arg, "arg is marked non-null but is null"); + test = checkNotNull(test); + } + @java.lang.SuppressWarnings("all") + public void setTest(@lombok.NonNull final String test) { + com.google.common.base.Preconditions.checkNotNull(test, "test is marked non-null but is null"); + this.test = test; + } +}
\ No newline at end of file |