mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-15 00:17:45 +00:00
Do not resolve type if the name does not match
This commit is contained in:
1 parent
e75517d561
commit
faa682b416
1 file changed
+2
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user