aboutsummaryrefslogtreecommitdiff
path: root/src/core/lombok/javac/handlers/HandleDelegate.java
diff options
context:
space:
mode:
authorReinier Zwitserloot <r.zwitserloot@projectlombok.org>2020-11-13 04:37:27 +0100
committerReinier Zwitserloot <r.zwitserloot@projectlombok.org>2020-11-13 04:44:39 +0100
commit3aace094f336393330ed275e1fb6d6c1f9187e14 (patch)
tree3c235a645f057a393194bf789fc4ce4bfaaef340 /src/core/lombok/javac/handlers/HandleDelegate.java
parent219bb4bea5035c370614474f630dac454cfe4223 (diff)
downloadlombok-3aace094f336393330ed275e1fb6d6c1f9187e14.tar.gz
lombok-3aace094f336393330ed275e1fb6d6c1f9187e14.tar.bz2
lombok-3aace094f336393330ed275e1fb6d6c1f9187e14.zip
[refactor] reflection code streamlined by sending it through the Permit class
Diffstat (limited to 'src/core/lombok/javac/handlers/HandleDelegate.java')
-rw-r--r--src/core/lombok/javac/handlers/HandleDelegate.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/lombok/javac/handlers/HandleDelegate.java b/src/core/lombok/javac/handlers/HandleDelegate.java
index d6e76ab1..ac414fbb 100644
--- a/src/core/lombok/javac/handlers/HandleDelegate.java
+++ b/src/core/lombok/javac/handlers/HandleDelegate.java
@@ -81,6 +81,7 @@ import lombok.javac.JavacResolution;
import lombok.javac.JavacResolution.TypeNotConvertibleException;
import lombok.javac.JavacTreeMaker;
import lombok.javac.ResolutionResetNeeded;
+import lombok.permit.Permit;
@ProviderFor(JavacAnnotationHandler.class)
@HandlerPriority(HandleDelegate.HANDLE_DELEGATE_PRIORITY) //2^16; to make sure that we also delegate generated methods.
@@ -466,7 +467,7 @@ public class HandleDelegate extends JavacAnnotationHandler<Delegate> {
static {
Method m = null;
try {
- m = Type.class.getDeclaredMethod("unannotatedType");
+ m = Permit.getMethod(Type.class, "unannotatedType");
} catch (Exception e) {/* ignore */}
unannotated = m;
}
@@ -474,7 +475,7 @@ public class HandleDelegate extends JavacAnnotationHandler<Delegate> {
static Type unannotatedType(Type t) {
if (unannotated == null) return t;
try {
- return (Type) unannotated.invoke(t);
+ return (Type) Permit.invoke(unannotated, t);
} catch (Exception e) {
return t;
}