diff options
author | Reinier Zwitserloot <reinier@zwitserloot.com> | 2017-02-14 00:19:14 +0100 |
---|---|---|
committer | Reinier Zwitserloot <reinier@zwitserloot.com> | 2017-02-14 00:19:14 +0100 |
commit | 1d32894ca316dd83c873d1e46746ee6ca37f8059 (patch) | |
tree | 434be1858a180e6a10217e341f61492871f42b87 /src/core/lombok/javac/handlers | |
parent | 627e9dc8a7f381ace59f91c9ee4a023733d4717e (diff) | |
download | lombok-1d32894ca316dd83c873d1e46746ee6ca37f8059.tar.gz lombok-1d32894ca316dd83c873d1e46746ee6ca37f8059.tar.bz2 lombok-1d32894ca316dd83c873d1e46746ee6ca37f8059.zip |
Fixes issue #1287 - if a field gets marked as static via `@UtilityClass`, don’t make it final via `@FieldDefaults`.
Diffstat (limited to 'src/core/lombok/javac/handlers')
-rw-r--r-- | src/core/lombok/javac/handlers/HandleUtilityClass.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/lombok/javac/handlers/HandleUtilityClass.java b/src/core/lombok/javac/handlers/HandleUtilityClass.java index 6d3ec63b..ee8081d6 100644 --- a/src/core/lombok/javac/handlers/HandleUtilityClass.java +++ b/src/core/lombok/javac/handlers/HandleUtilityClass.java @@ -44,6 +44,7 @@ import com.sun.tools.javac.util.Name; import lombok.ConfigurationKeys; import lombok.core.AST.Kind; import lombok.core.AnnotationValues; +import lombok.core.HandlerPriority; import lombok.experimental.UtilityClass; import lombok.javac.Javac; import lombok.javac.JavacAnnotationHandler; @@ -53,6 +54,7 @@ import lombok.javac.JavacTreeMaker; /** * Handles the {@code @UtilityClass} annotation for javac. */ +@HandlerPriority(-4096) //-2^12; to ensure @FieldDefaults picks up on the 'static' we set here. @ProviderFor(JavacAnnotationHandler.class) public class HandleUtilityClass extends JavacAnnotationHandler<UtilityClass> { @Override public void handle(AnnotationValues<UtilityClass> annotation, JCAnnotation ast, JavacNode annotationNode) { |