From ce0a09177e577c0b4f42379c5cc7ce364f26c905 Mon Sep 17 00:00:00 2001 From: Bulgakov Alexander Date: Fri, 26 Apr 2019 22:10:34 +0300 Subject: #1976. A handlers' order has been changed. The javac's HandleDelegate generates code before the HandleVal. --- src/core/lombok/javac/handlers/HandleVal.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/core/lombok/javac/handlers/HandleVal.java') diff --git a/src/core/lombok/javac/handlers/HandleVal.java b/src/core/lombok/javac/handlers/HandleVal.java index 14130bc4..323bb337 100644 --- a/src/core/lombok/javac/handlers/HandleVal.java +++ b/src/core/lombok/javac/handlers/HandleVal.java @@ -22,6 +22,7 @@ package lombok.javac.handlers; import static lombok.core.handlers.HandlerUtil.handleFlagUsage; +import static lombok.javac.handlers.HandleDelegate.HANDLE_DELEGATE_PRIORITY; import static lombok.javac.handlers.JavacHandlerUtil.*; import lombok.ConfigurationKeys; import lombok.val; @@ -49,7 +50,7 @@ import com.sun.tools.javac.tree.JCTree.JCVariableDecl; import com.sun.tools.javac.util.List; @ProviderFor(JavacASTVisitor.class) -@HandlerPriority(65536) // 2^16; resolution needs to work, so if the RHS expression is i.e. a call to a generated getter, we have to run after that getter has been generated. +@HandlerPriority(HANDLE_DELEGATE_PRIORITY + 100) // 2^16; resolution needs to work, so if the RHS expression is i.e. a call to a generated getter, we have to run after that getter has been generated. @ResolutionResetNeeded public class HandleVal extends JavacASTAdapter { -- cgit From ec04d9d7f077b83071de84a337338c9983db43bf Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Tue, 30 Apr 2019 22:37:45 +0200 Subject: [trivial] update a comment to be more accurate about the priority of handler for val. --- src/core/lombok/javac/handlers/HandleVal.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/lombok/javac/handlers/HandleVal.java') diff --git a/src/core/lombok/javac/handlers/HandleVal.java b/src/core/lombok/javac/handlers/HandleVal.java index 323bb337..23c27bc0 100644 --- a/src/core/lombok/javac/handlers/HandleVal.java +++ b/src/core/lombok/javac/handlers/HandleVal.java @@ -50,7 +50,7 @@ import com.sun.tools.javac.tree.JCTree.JCVariableDecl; import com.sun.tools.javac.util.List; @ProviderFor(JavacASTVisitor.class) -@HandlerPriority(HANDLE_DELEGATE_PRIORITY + 100) // 2^16; resolution needs to work, so if the RHS expression is i.e. a call to a generated getter, we have to run after that getter has been generated. +@HandlerPriority(HANDLE_DELEGATE_PRIORITY + 100) // run slightly after HandleDelegate; resolution needs to work, so if the RHS expression is i.e. a call to a generated getter, we have to run after that getter has been generated. @ResolutionResetNeeded public class HandleVal extends JavacASTAdapter { -- cgit