diff options
author | Reinier Zwitserloot <r.zwitserloot@projectlombok.org> | 2022-03-01 18:05:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-01 18:05:38 +0100 |
commit | 8c3ff7e9b08c4bf9c2b23cffb6042c31258e3ebb (patch) | |
tree | 56747d50cda77d9e96da9babfbd4cd1544766491 /test/transform/resource/after-delombok | |
parent | 560ded50127b12bd8168f8ae2bada47253f15bc8 (diff) | |
parent | c67909e2039cdac449808464ff28a8e71a56b7a1 (diff) | |
download | lombok-8c3ff7e9b08c4bf9c2b23cffb6042c31258e3ebb.tar.gz lombok-8c3ff7e9b08c4bf9c2b23cffb6042c31258e3ebb.tar.bz2 lombok-8c3ff7e9b08c4bf9c2b23cffb6042c31258e3ebb.zip |
Merge pull request #3121 from JohnPaulTaylorII/master
Fixes #3120
Diffstat (limited to 'test/transform/resource/after-delombok')
-rw-r--r-- | test/transform/resource/after-delombok/EqualsAndHashCodeWithNonNullByDefault.java | 23 |
1 files changed, 23 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; + } +} |