diff options
author | Reinier Zwitserloot <reinier@zwitserloot.com> | 2010-11-09 23:52:54 +0100 |
---|---|---|
committer | Reinier Zwitserloot <reinier@zwitserloot.com> | 2010-11-09 23:52:54 +0100 |
commit | 186b16c28cf461f88a3b5eecd2fa4523af2949d9 (patch) | |
tree | be2e008970c2e8bdc4606a39d8940ab141cfa85a /src/core/lombok/eclipse | |
parent | c88ae3af7432513987eafaf13c178baa77cb0667 (diff) | |
download | lombok-186b16c28cf461f88a3b5eecd2fa4523af2949d9.tar.gz lombok-186b16c28cf461f88a3b5eecd2fa4523af2949d9.tar.bz2 lombok-186b16c28cf461f88a3b5eecd2fa4523af2949d9.zip |
EqualsAndHashCode no longer worked right when working on a class with 0 fileds. Fixed. Thanks to Philipp Eichhorn for spotting this problem!
Diffstat (limited to 'src/core/lombok/eclipse')
-rw-r--r-- | src/core/lombok/eclipse/handlers/HandleEqualsAndHashCode.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/lombok/eclipse/handlers/HandleEqualsAndHashCode.java b/src/core/lombok/eclipse/handlers/HandleEqualsAndHashCode.java index 23d24fb0..2b830241 100644 --- a/src/core/lombok/eclipse/handlers/HandleEqualsAndHashCode.java +++ b/src/core/lombok/eclipse/handlers/HandleEqualsAndHashCode.java @@ -505,7 +505,7 @@ public class HandleEqualsAndHashCode implements EclipseAnnotationHandler<EqualsA char[] otherName = "other".toCharArray(); /* MyType<?> other = (MyType<?>) o; */ { - if (!fields.isEmpty()) { + if (!fields.isEmpty() || needsCanEqual) { LocalDeclaration other = new LocalDeclaration(otherName, pS, pE); other.modifiers |= ClassFileConstants.AccFinal; Eclipse.setGeneratedBy(other, source); |