aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource/before/NonNullWithGuava.java
diff options
context:
space:
mode:
Diffstat (limited to 'test/transform/resource/before/NonNullWithGuava.java')
-rw-r--r--test/transform/resource/before/NonNullWithGuava.java33
1 files changed, 33 insertions, 0 deletions
diff --git a/test/transform/resource/before/NonNullWithGuava.java b/test/transform/resource/before/NonNullWithGuava.java
new file mode 100644
index 00000000..dc877daa
--- /dev/null
+++ b/test/transform/resource/before/NonNullWithGuava.java
@@ -0,0 +1,33 @@
+//CONF: lombok.nonNull.exceptionType = Guava
+import static com.google.common.base.Preconditions.*;
+public class NonNullWithGuava {
+ @lombok.NonNull @lombok.Setter private String test;
+
+ public void testMethod(@lombok.NonNull String arg) {
+ 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) {
+ checkNotNull("");
+ }
+
+ public void testMethodWithFakeCheck2(@lombok.NonNull String arg) {
+ com.google.common.base.Preconditions.checkNotNull(test);
+ }
+
+ public void testMethodWithFakeCheckAssign(@lombok.NonNull String arg) {
+ test = checkNotNull(test);
+ }
+}