From 186b16c28cf461f88a3b5eecd2fa4523af2949d9 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Tue, 9 Nov 2010 23:52:54 +0100 Subject: EqualsAndHashCode no longer worked right when working on a class with 0 fileds. Fixed. Thanks to Philipp Eichhorn for spotting this problem! --- src/core/lombok/eclipse/handlers/HandleEqualsAndHashCode.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/lombok/eclipse') 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 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); -- cgit