diff options
author | Reinier Zwitserloot <reinier@zwitserloot.com> | 2011-08-15 22:47:10 +0200 |
---|---|---|
committer | Reinier Zwitserloot <reinier@zwitserloot.com> | 2011-08-15 22:47:10 +0200 |
commit | af9ac60c6ff42c53b21f09b029383fdcd545dedf (patch) | |
tree | d8ea836aacb97e7d596558dc46013f3e3d1d1b26 /src/core/lombok/eclipse/Eclipse.java | |
parent | 41e58cde0f9760d9b687e6d24ac717210e3e20ac (diff) | |
parent | 82b14a30893d509e055ed06d1576c5e16d397995 (diff) | |
download | lombok-af9ac60c6ff42c53b21f09b029383fdcd545dedf.tar.gz lombok-af9ac60c6ff42c53b21f09b029383fdcd545dedf.tar.bz2 lombok-af9ac60c6ff42c53b21f09b029383fdcd545dedf.zip |
Merge branch 'delombok_java7'
Diffstat (limited to 'src/core/lombok/eclipse/Eclipse.java')
-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(); |