mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-16 04:13:56 +00:00
add tests to ensure onlyExplicitlyIncluded means nothing if no fields are annotated. Fixes #1772
This commit is contained in:
1 parent
7ee4ebb1a5
commit
89294fe03c
6 files changed
+70
No files matched your search
@@ -0,0 +1,22 @@
|
||||
class EqualsAndHashCodeExplicitInclude {
|
||||
int x;
|
||||
@java.lang.Override
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public boolean equals(final java.lang.Object o) {
|
||||
if (o == this) return true;
|
||||
if (!(o instanceof EqualsAndHashCodeExplicitInclude)) return false;
|
||||
final EqualsAndHashCodeExplicitInclude other = (EqualsAndHashCodeExplicitInclude) 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 EqualsAndHashCodeExplicitInclude;
|
||||
}
|
||||
@java.lang.Override
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public int hashCode() {
|
||||
int result = 1;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user