aboutsummaryrefslogtreecommitdiff
path: root/src/core/lombok/eclipse/Eclipse.java
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2011-08-15 22:47:10 +0200
committerReinier Zwitserloot <reinier@zwitserloot.com>2011-08-15 22:47:10 +0200
commitaf9ac60c6ff42c53b21f09b029383fdcd545dedf (patch)
treed8ea836aacb97e7d596558dc46013f3e3d1d1b26 /src/core/lombok/eclipse/Eclipse.java
parent41e58cde0f9760d9b687e6d24ac717210e3e20ac (diff)
parent82b14a30893d509e055ed06d1576c5e16d397995 (diff)
downloadlombok-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.java5
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();