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/javac/handlers | |
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/javac/handlers')
-rw-r--r-- | src/core/lombok/javac/handlers/HandleFieldDefaults.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/lombok/javac/handlers/HandleFieldDefaults.java b/src/core/lombok/javac/handlers/HandleFieldDefaults.java index 5fb46afe..12c22059 100644 --- a/src/core/lombok/javac/handlers/HandleFieldDefaults.java +++ b/src/core/lombok/javac/handlers/HandleFieldDefaults.java @@ -140,8 +140,8 @@ public class HandleFieldDefaults extends JavacASTAdapter { if (fd == null && (type.mods.flags & (Flags.INTERFACE | Flags.ANNOTATION)) != 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; |