add tests to ensure onlyExplicitlyIncluded means nothing if no fields are annotated. Fixes #1772

This commit is contained in:
Roel Spilker committed 2018-10-15 23:19:55 +02:00
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;
}
}