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,23 @@
@lombok.EqualsAndHashCode(onlyExplicitlyIncluded = true) class EqualsAndHashCodeExplicitInclude {
int x;
EqualsAndHashCodeExplicitInclude() {
super();
}
public @java.lang.Override @java.lang.SuppressWarnings("all") 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;
}
protected @java.lang.SuppressWarnings("all") boolean canEqual(final java.lang.Object other) {
return (other instanceof EqualsAndHashCodeExplicitInclude);
}
public @java.lang.Override @java.lang.SuppressWarnings("all") int hashCode() {
int result = 1;
return result;
}
}