diff options
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/lombok/eclipse/Eclipse.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/lombok/eclipse/Eclipse.java b/src/core/lombok/eclipse/Eclipse.java index 2cb2fe33..858c2fe9 100644 --- a/src/core/lombok/eclipse/Eclipse.java +++ b/src/core/lombok/eclipse/Eclipse.java @@ -581,7 +581,10 @@ public class Eclipse { * @param typeRef A type reference to check. */ public static boolean typeMatches(Class<?> type, EclipseNode node, TypeReference typeRef) { - if (typeRef == null || typeRef.getTypeName() == null) return false; + if (typeRef == null || typeRef.getTypeName() == null || typeRef.getTypeName().length == 0) return false; + String lastPartA = new String(typeRef.getTypeName()[typeRef.getTypeName().length -1]); + String lastPartB = type.getSimpleName(); + if (!lastPartA.equals(lastPartB)) return false; String typeName = toQualifiedName(typeRef.getTypeName()); TypeLibrary library = new TypeLibrary(); |