From 8428be5c680b5b9e89a58a3ea77d134196f52957 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Sat, 1 Aug 2009 13:14:59 +0200 Subject: The warning for not enabling callSuper cannot be avoided, but there are legal reasons for using it, so, changed it: explicitly setting 'callSuper=false' removes the warning. You only get the warning if callSuper is false because that's the default. Fixes issue #13 --- src/lombok/eclipse/handlers/HandleEqualsAndHashCode.java | 11 ++++++----- src/lombok/javac/handlers/HandleEqualsAndHashCode.java | 11 ++++++----- 2 files changed, 12 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/lombok/eclipse/handlers/HandleEqualsAndHashCode.java b/src/lombok/eclipse/handlers/HandleEqualsAndHashCode.java index d8e1562e..c94fde76 100644 --- a/src/lombok/eclipse/handlers/HandleEqualsAndHashCode.java +++ b/src/lombok/eclipse/handlers/HandleEqualsAndHashCode.java @@ -126,7 +126,7 @@ public class HandleEqualsAndHashCode implements EclipseAnnotationHandleremptyList(), callSuper, false); + generateMethods(typeNode, errorNode, Collections.emptyList(), callSuper, true, false); } @Override public boolean handle(AnnotationValues annotation, Annotation ast, Node annotationNode) { @@ -136,11 +136,12 @@ public class HandleEqualsAndHashCode implements EclipseAnnotationHandler excludes, - boolean callSuper, boolean whineIfExists) { + boolean callSuper, boolean implicit, boolean whineIfExists) { TypeDeclaration typeDecl = null; if ( typeNode.get() instanceof TypeDeclaration ) typeDecl = (TypeDeclaration) typeNode.get(); @@ -165,8 +166,8 @@ public class HandleEqualsAndHashCode implements EclipseAnnotationHandler nodesForEquality = new ArrayList(); diff --git a/src/lombok/javac/handlers/HandleEqualsAndHashCode.java b/src/lombok/javac/handlers/HandleEqualsAndHashCode.java index 1a1158eb..18202eb5 100644 --- a/src/lombok/javac/handlers/HandleEqualsAndHashCode.java +++ b/src/lombok/javac/handlers/HandleEqualsAndHashCode.java @@ -86,7 +86,8 @@ public class HandleEqualsAndHashCode implements JavacAnnotationHandlernil(), callSuper, false); + generateMethods(typeNode, errorNode, List.nil(), callSuper, true, false); } private boolean generateMethods(Node typeNode, Node errorNode, List excludes, - boolean callSuper, boolean whineIfExists) { + boolean callSuper, boolean implicit, boolean whineIfExists) { boolean notAClass = true; if ( typeNode.get() instanceof JCClassDecl ) { long flags = ((JCClassDecl)typeNode.get()).mods.flags; @@ -132,8 +133,8 @@ public class HandleEqualsAndHashCode implements JavacAnnotationHandler nodesForEquality = List.nil(); -- cgit