aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/transform/resource/after-delombok/EqualsAndHashCodeWithNonNullByDefault.java23
-rw-r--r--test/transform/resource/after-ecj/EqualsAndHashCodeWithNonNullByDefault.java23
-rw-r--r--test/transform/resource/before/EqualsAndHashCodeWithNonNullByDefault.java6
3 files changed, 52 insertions, 0 deletions
diff --git a/test/transform/resource/after-delombok/EqualsAndHashCodeWithNonNullByDefault.java b/test/transform/resource/after-delombok/EqualsAndHashCodeWithNonNullByDefault.java
new file mode 100644
index 00000000..37711004
--- /dev/null
+++ b/test/transform/resource/after-delombok/EqualsAndHashCodeWithNonNullByDefault.java
@@ -0,0 +1,23 @@
+import javax.annotation.ParametersAreNonnullByDefault;
+@ParametersAreNonnullByDefault
+class EqualsAndHashCodeWithNonNullByDefault {
+ @java.lang.Override
+ @java.lang.SuppressWarnings("all")
+ public boolean equals(@javax.annotation.Nullable final java.lang.Object o) {
+ if (o == this) return true;
+ if (!(o instanceof EqualsAndHashCodeWithNonNullByDefault)) return false;
+ final EqualsAndHashCodeWithNonNullByDefault other = (EqualsAndHashCodeWithNonNullByDefault) o;
+ if (!other.canEqual((java.lang.Object) this)) return false;
+ return true;
+ }
+ @java.lang.SuppressWarnings("all")
+ protected boolean canEqual(@javax.annotation.Nullable final java.lang.Object other) {
+ return other instanceof EqualsAndHashCodeWithNonNullByDefault;
+ }
+ @java.lang.Override
+ @java.lang.SuppressWarnings("all")
+ public int hashCode() {
+ final int result = 1;
+ return result;
+ }
+}
diff --git a/test/transform/resource/after-ecj/EqualsAndHashCodeWithNonNullByDefault.java b/test/transform/resource/after-ecj/EqualsAndHashCodeWithNonNullByDefault.java
new file mode 100644
index 00000000..0cd170b4
--- /dev/null
+++ b/test/transform/resource/after-ecj/EqualsAndHashCodeWithNonNullByDefault.java
@@ -0,0 +1,23 @@
+import javax.annotation.ParametersAreNonnullByDefault;
+@lombok.EqualsAndHashCode @ParametersAreNonnullByDefault class EqualsAndHashCodeWithNonNullByDefault {
+ EqualsAndHashCodeWithNonNullByDefault() {
+ super();
+ }
+ public @java.lang.Override @java.lang.SuppressWarnings("all") boolean equals(final @javax.annotation.Nullable java.lang.Object o) {
+ if ((o == this))
+ return true;
+ if ((! (o instanceof EqualsAndHashCodeWithNonNullByDefault)))
+ return false;
+ final EqualsAndHashCodeWithNonNullByDefault other = (EqualsAndHashCodeWithNonNullByDefault) o;
+ if ((! other.canEqual((java.lang.Object) this)))
+ return false;
+ return true;
+ }
+ protected @java.lang.SuppressWarnings("all") boolean canEqual(final @javax.annotation.Nullable java.lang.Object other) {
+ return (other instanceof EqualsAndHashCodeWithNonNullByDefault);
+ }
+ public @java.lang.Override @java.lang.SuppressWarnings("all") int hashCode() {
+ final int result = 1;
+ return result;
+ }
+} \ No newline at end of file
diff --git a/test/transform/resource/before/EqualsAndHashCodeWithNonNullByDefault.java b/test/transform/resource/before/EqualsAndHashCodeWithNonNullByDefault.java
new file mode 100644
index 00000000..f91bce3c
--- /dev/null
+++ b/test/transform/resource/before/EqualsAndHashCodeWithNonNullByDefault.java
@@ -0,0 +1,6 @@
+//CONF: lombok.addNullAnnotations = javax
+import javax.annotation.ParametersAreNonnullByDefault;
+@lombok.EqualsAndHashCode
+@ParametersAreNonnullByDefault
+class EqualsAndHashCodeWithNonNullByDefault {
+} \ No newline at end of file