diff options
author | Reinier Zwitserloot <reinier@zwitserloot.com> | 2015-10-06 00:33:52 +0200 |
---|---|---|
committer | Reinier Zwitserloot <reinier@zwitserloot.com> | 2015-10-06 00:33:52 +0200 |
commit | c9399b59113027e869e0f716b83d991755bdbd5c (patch) | |
tree | 076cb8fb569be708f43f1490a2f13fb0a26117d2 /src/core/lombok/eclipse | |
parent | 9d8c4e4099bef9b7854cc5d77bc996c3b3bf0e41 (diff) | |
download | lombok-c9399b59113027e869e0f716b83d991755bdbd5c.tar.gz lombok-c9399b59113027e869e0f716b83d991755bdbd5c.tar.bz2 lombok-c9399b59113027e869e0f716b83d991755bdbd5c.zip |
Belated updated to previous commit for config-key field defaults: Don’t read a config key if it has no possible impact on what we’re going to do.
Diffstat (limited to 'src/core/lombok/eclipse')
-rw-r--r-- | src/core/lombok/eclipse/handlers/HandleFieldDefaults.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/lombok/eclipse/handlers/HandleFieldDefaults.java b/src/core/lombok/eclipse/handlers/HandleFieldDefaults.java index f97a721b..5ea5a210 100644 --- a/src/core/lombok/eclipse/handlers/HandleFieldDefaults.java +++ b/src/core/lombok/eclipse/handlers/HandleFieldDefaults.java @@ -160,8 +160,8 @@ public class HandleFieldDefaults extends EclipseASTAdapter { if (fd == null && (type.modifiers & (ClassFileConstants.AccInterface | ClassFileConstants.AccAnnotation)) != 0) return; - boolean defaultToPrivate = Boolean.TRUE.equals(typeNode.getAst().readConfiguration(ConfigurationKeys.FIELD_DEFAULTS_PRIVATE_EVERYWHERE)); - boolean defaultToFinal = Boolean.TRUE.equals(typeNode.getAst().readConfiguration(ConfigurationKeys.FIELD_DEFAULTS_FINAL_EVERYWHERE)); + boolean defaultToPrivate = levelIsExplicit ? false : Boolean.TRUE.equals(typeNode.getAst().readConfiguration(ConfigurationKeys.FIELD_DEFAULTS_PRIVATE_EVERYWHERE)); + boolean defaultToFinal = makeFinalIsExplicit ? false : Boolean.TRUE.equals(typeNode.getAst().readConfiguration(ConfigurationKeys.FIELD_DEFAULTS_FINAL_EVERYWHERE)); if (!defaultToPrivate && !defaultToFinal && fieldDefaults == null) return; AccessLevel fdAccessLevel = (fieldDefaults != null && levelIsExplicit) ? fd.level() : defaultToPrivate ? AccessLevel.PRIVATE : null; |