From faa682b41620d76796a4196e51fd2e2603c349a6 Mon Sep 17 00:00:00 2001 From: Rawi01 Date: Sun, 21 Jun 2020 13:59:37 +0200 Subject: Do not resolve type if the name does not match --- src/eclipseAgent/lombok/eclipse/agent/PatchDelegate.java | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/eclipseAgent/lombok/eclipse/agent/PatchDelegate.java b/src/eclipseAgent/lombok/eclipse/agent/PatchDelegate.java index ebd60ce9..1a287d93 100644 --- a/src/eclipseAgent/lombok/eclipse/agent/PatchDelegate.java +++ b/src/eclipseAgent/lombok/eclipse/agent/PatchDelegate.java @@ -321,6 +321,8 @@ public class PatchDelegate { private static boolean isDelegate(Annotation ann, TypeDeclaration decl) { if (ann.type == null) return false; + if (!charArrayEquals("Delegate", ann.type.getLastToken())) return false; + TypeBinding tb = ann.type.resolveType(decl.initializerScope); if (tb == null) return false; if (!charArrayEquals("lombok", tb.qualifiedPackageName()) && !charArrayEquals("lombok.experimental", tb.qualifiedPackageName())) return false; -- cgit