mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-19 08:15:20 +00:00
deprecating the old Value annotation also added deprecation warnings to where we still support it as an alias. fixed.
This commit is contained in:
1 parent
fb32de51af
commit
420e0dcb53
1 file changed
+6
-1
@@ -22,6 +22,9 @@
|
||||
package lombok.javac.handlers;
|
||||
|
||||
import static lombok.javac.handlers.JavacHandlerUtil.*;
|
||||
|
||||
import java.lang.annotation.Annotation;
|
||||
|
||||
import lombok.AccessLevel;
|
||||
import lombok.core.AnnotationValues;
|
||||
import lombok.core.HandlerPriority;
|
||||
@@ -45,7 +48,9 @@ import com.sun.tools.javac.tree.JCTree.JCModifiers;
|
||||
@HandlerPriority(-512) //-2^9; to ensure @EqualsAndHashCode and such pick up on this handler making the class final and messing with the fields' access levels, run earlier.
|
||||
public class HandleValue extends JavacAnnotationHandler<Value> {
|
||||
@Override public void handle(AnnotationValues<Value> annotation, JCAnnotation ast, JavacNode annotationNode) {
|
||||
deleteAnnotationIfNeccessary(annotationNode, Value.class, lombok.experimental.Value.class);
|
||||
@SuppressWarnings("deprecation")
|
||||
Class<? extends Annotation> oldExperimentalValue = lombok.experimental.Value.class;
|
||||
deleteAnnotationIfNeccessary(annotationNode, Value.class, oldExperimentalValue);
|
||||
JavacNode typeNode = annotationNode.up();
|
||||
boolean notAClass = !isClass(typeNode);
|
||||
|
||||
|
||||
Reference in new issue
Block a user