From 2a6c0c16b303b6af0b96e296858c2c54140f6dfe Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Wed, 28 Mar 2018 00:38:07 +0200 Subject: [builderParentClass] Code to handle builder on enums removed; that doesn’t make a heck of a lot of sense and enums aren’t extensible in the first place. Also fixed up a wrong access level; now all existing builder tests pass. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/lombok/eclipse/handlers/HandleBuilder.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/core/lombok/eclipse') diff --git a/src/core/lombok/eclipse/handlers/HandleBuilder.java b/src/core/lombok/eclipse/handlers/HandleBuilder.java index b5c6e793..08ef91b5 100644 --- a/src/core/lombok/eclipse/handlers/HandleBuilder.java +++ b/src/core/lombok/eclipse/handlers/HandleBuilder.java @@ -604,12 +604,9 @@ public class HandleBuilder extends EclipseAnnotationHandler { TypeDeclaration typeDeclaration = ((TypeDeclaration) typeNode.get()); long p = (long) source.sourceStart << 32 | source.sourceEnd; - boolean isEnum = (((TypeDeclaration) typeNode.get()).modifiers & ClassFileConstants.AccEnum) != 0; - AccessLevel level = isEnum ? AccessLevel.PRIVATE : AccessLevel.PROTECTED; - ConstructorDeclaration constructor = new ConstructorDeclaration(((CompilationUnitDeclaration) typeNode.top().get()).compilationResult); - constructor.modifiers = toEclipseModifier(level); + constructor.modifiers = toEclipseModifier(AccessLevel.PROTECTED); constructor.selector = typeDeclaration.name; if (callBuilderBasedSuperConstructor) { constructor.constructorCall = new ExplicitConstructorCall(ExplicitConstructorCall.Super); -- cgit