diff options
author | Reinier Zwitserloot <r.zwitserloot@projectlombok.org> | 2020-01-08 01:06:35 +0100 |
---|---|---|
committer | Reinier Zwitserloot <r.zwitserloot@projectlombok.org> | 2020-01-08 01:06:35 +0100 |
commit | 9ad2bd563b001c0742d767fea9ddaaeb60400ec7 (patch) | |
tree | 82d9653d555b46b1a42f7c8086e87bd6aefd16a8 /test/transform/resource/after-ecj | |
parent | 0b0656ae3c38ae915c86e17c2744d5e3d8fc805c (diff) | |
download | lombok-9ad2bd563b001c0742d767fea9ddaaeb60400ec7.tar.gz lombok-9ad2bd563b001c0742d767fea9ddaaeb60400ec7.tar.bz2 lombok-9ad2bd563b001c0742d767fea9ddaaeb60400ec7.zip |
[fixes #788] lombok generated equals method plus a non-null-by-default annotation no longer clash.
Diffstat (limited to 'test/transform/resource/after-ecj')
-rw-r--r-- | test/transform/resource/after-ecj/EqualsAndHashCodeWithNNBD.java | 28 |
1 files changed, 28 insertions, 0 deletions
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 |