diff options
Diffstat (limited to 'test/transform')
6 files changed, 71 insertions, 0 deletions
diff --git a/test/transform/resource/after-delombok/EqualsAndHashCodeWithNNBD.java b/test/transform/resource/after-delombok/EqualsAndHashCodeWithNNBD.java new file mode 100644 index 00000000..6eaf9f36 --- /dev/null +++ b/test/transform/resource/after-delombok/EqualsAndHashCodeWithNNBD.java @@ -0,0 +1,30 @@ +import javax.annotation.ParametersAreNonnullByDefault; + +@ParametersAreNonnullByDefault +class EqualsAndHashCodeWithNNBD { + + @org.eclipse.jdt.annotation.NonNullByDefault + static class Inner { + @java.lang.Override + @java.lang.SuppressWarnings("all") + public boolean equals(final java.lang.@javax.annotation.Nullable @org.eclipse.jdt.annotation.Nullable Object o) { + if (o == this) return true; + if (!(o instanceof EqualsAndHashCodeWithNNBD.Inner)) return false; + final EqualsAndHashCodeWithNNBD.Inner other = (EqualsAndHashCodeWithNNBD.Inner) o; + if (!other.canEqual((java.lang.Object) this)) return false; + return true; + } + + @java.lang.SuppressWarnings("all") + protected boolean canEqual(final java.lang.Object other) { + return other instanceof EqualsAndHashCodeWithNNBD.Inner; + } + + @java.lang.Override + @java.lang.SuppressWarnings("all") + public int hashCode() { + final int result = 1; + return result; + } + } +}
\ No newline at end of file diff --git a/test/transform/resource/after-ecj/EqualsAndHashCodeWithNNBD.java b/test/transform/resource/after-ecj/EqualsAndHashCodeWithNNBD.java new file mode 100644 index 00000000..4781839d --- /dev/null +++ b/test/transform/resource/after-ecj/EqualsAndHashCodeWithNNBD.java @@ -0,0 +1,28 @@ +import javax.annotation.ParametersAreNonnullByDefault; +@ParametersAreNonnullByDefault class EqualsAndHashCodeWithNNBD { + static @lombok.EqualsAndHashCode @org.eclipse.jdt.annotation.NonNullByDefault class Inner { + Inner() { + super(); + } + public @java.lang.Override @java.lang.SuppressWarnings("all") boolean equals(final java.lang.@javax.annotation.Nullable @org.eclipse.jdt.annotation.Nullable Object o) { + if ((o == this)) + return true; + if ((! (o instanceof EqualsAndHashCodeWithNNBD.Inner))) + return false; + final EqualsAndHashCodeWithNNBD.Inner other = (EqualsAndHashCodeWithNNBD.Inner) o; + if ((! other.canEqual((java.lang.Object) this))) + return false; + return true; + } + protected @java.lang.SuppressWarnings("all") boolean canEqual(final java.lang.Object other) { + return (other instanceof EqualsAndHashCodeWithNNBD.Inner); + } + public @java.lang.Override @java.lang.SuppressWarnings("all") int hashCode() { + final int result = 1; + return result; + } + } + EqualsAndHashCodeWithNNBD() { + super(); + } +}
\ No newline at end of file diff --git a/test/transform/resource/before/EqualsAndHashCodeWithNNBD.java b/test/transform/resource/before/EqualsAndHashCodeWithNNBD.java new file mode 100644 index 00000000..dc86cb55 --- /dev/null +++ b/test/transform/resource/before/EqualsAndHashCodeWithNNBD.java @@ -0,0 +1,8 @@ +// version 8: +import javax.annotation.ParametersAreNonnullByDefault; +@ParametersAreNonnullByDefault +class EqualsAndHashCodeWithNNBD { + @lombok.EqualsAndHashCode @org.eclipse.jdt.annotation.NonNullByDefault + static class Inner { + } +} diff --git a/test/transform/resource/messages-delombok/EqualsAndHashCodeWithNNBD.java.messages b/test/transform/resource/messages-delombok/EqualsAndHashCodeWithNNBD.java.messages new file mode 100644 index 00000000..31259a51 --- /dev/null +++ b/test/transform/resource/messages-delombok/EqualsAndHashCodeWithNNBD.java.messages @@ -0,0 +1 @@ +5 package org.eclipse.jdt.annotation does not exist diff --git a/test/transform/resource/messages-ecj/EqualsAndHashCodeWithNNBD.java.messages b/test/transform/resource/messages-ecj/EqualsAndHashCodeWithNNBD.java.messages new file mode 100644 index 00000000..8fa7c194 --- /dev/null +++ b/test/transform/resource/messages-ecj/EqualsAndHashCodeWithNNBD.java.messages @@ -0,0 +1 @@ +2 The import javax.annotation.ParametersAreNonnullByDefault cannot be resolved diff --git a/test/transform/resource/messages-idempotent/EqualsAndHashCodeWithNNBD.java.messages b/test/transform/resource/messages-idempotent/EqualsAndHashCodeWithNNBD.java.messages new file mode 100644 index 00000000..76ed9da0 --- /dev/null +++ b/test/transform/resource/messages-idempotent/EqualsAndHashCodeWithNNBD.java.messages @@ -0,0 +1,3 @@ +6 package org.eclipse.jdt.annotation does not exist +10 package org.eclipse.jdt.annotation does not exist +10 annotation @javax.annotation.Nullable not applicable in this type context |