Do not resolve type if the name does not match

This commit is contained in:
Rawi01 authored and Roel Spilker committed 2020-06-25 23:06:10 +02:00
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;