diff options
author | Caleb Brinkman <cbrinkman@sonatype.com> | 2019-07-16 10:39:54 -0500 |
---|---|---|
committer | Caleb Brinkman <cbrinkman@sonatype.com> | 2019-07-16 10:39:54 -0500 |
commit | 4dc5c32d6b47264b5c8abb6fdf24077eec5aa7e7 (patch) | |
tree | 9779fbf1d16dab92b0f5076f773870653de49820 /test/transform/resource/after-ecj/NonNullWithGuava.java | |
parent | 88bf742e3e107cc0bbfc3a72c2f456d34ef3079c (diff) | |
parent | 218f28cc95ee30d5d362c3ac9d5440c2f86fd712 (diff) | |
download | lombok-4dc5c32d6b47264b5c8abb6fdf24077eec5aa7e7.tar.gz lombok-4dc5c32d6b47264b5c8abb6fdf24077eec5aa7e7.tar.bz2 lombok-4dc5c32d6b47264b5c8abb6fdf24077eec5aa7e7.zip |
Merge branch 'master' of github.com:rzwitserloot/lombok into feature/builder-setter-prefixes
Diffstat (limited to 'test/transform/resource/after-ecj/NonNullWithGuava.java')
-rw-r--r-- | test/transform/resource/after-ecj/NonNullWithGuava.java | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/test/transform/resource/after-ecj/NonNullWithGuava.java b/test/transform/resource/after-ecj/NonNullWithGuava.java new file mode 100644 index 00000000..c7f5a7fe --- /dev/null +++ b/test/transform/resource/after-ecj/NonNullWithGuava.java @@ -0,0 +1,36 @@ +import static com.google.common.base.Preconditions.*; +public class NonNullWithGuava { + private @lombok.NonNull @lombok.Setter String test; + public NonNullWithGuava() { + super(); + } + 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); + } + public @java.lang.SuppressWarnings("all") void setTest(final @lombok.NonNull String test) { + com.google.common.base.Preconditions.checkNotNull(test, "test is marked non-null but is null"); + this.test = test; + } +} |