diff options
author | acolyer <acolyer> | 2005-08-31 12:25:47 +0000 |
---|---|---|
committer | acolyer <acolyer> | 2005-08-31 12:25:47 +0000 |
commit | 014c5c64b44c697946c4c7c21c18f273ab0e913b (patch) | |
tree | 97b5b67fd30eaef4838ebae5b187f9d93469d980 /org.aspectj.ajdt.core | |
parent | 2c9ea11c6d7354d3e44aa59531964a15b4486519 (diff) | |
download | aspectj-014c5c64b44c697946c4c7c21c18f273ab0e913b.tar.gz aspectj-014c5c64b44c697946c4c7c21c18f273ab0e913b.zip |
tests for pr108454, 'Waving' crash on a 1.5 java generics?
Diffstat (limited to 'org.aspectj.ajdt.core')
-rw-r--r-- | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java index 576229bbc..07dc47a95 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java @@ -228,15 +228,24 @@ public class EclipseFactory { arguments[i] = fromBinding(ptb.arguments[i]); } } - ResolvedType baseType = UnresolvedType.forName(getName(binding)).resolve(getWorld()); + + String baseTypeSignature = null; + + ResolvedType baseType = getWorld().resolve(UnresolvedType.forName(getName(binding)),true); + if (baseType != ResolvedType.MISSING) { + // can legitimately be missing if a bound refers to a type we haven't added to the world yet... + if (!baseType.isGenericType() && arguments!=null) baseType = baseType.getGenericType(); + baseTypeSignature = baseType.getErasureSignature(); + } else { + baseTypeSignature = UnresolvedType.forName(getName(binding)).getSignature(); + } // Create an unresolved parameterized type. We can't create a resolved one as the // act of resolution here may cause recursion problems since the parameters may // be type variables that we haven't fixed up yet. - if (!baseType.isGenericType() && arguments!=null) baseType = baseType.getGenericType(); if (arguments==null) arguments=new UnresolvedType[0]; String parameterizedSig = ResolvedType.PARAMETERIZED_TYPE_IDENTIFIER+CharOperation.charToString(binding.genericTypeSignature()).substring(1); - return TypeFactory.createUnresolvedParameterizedType(parameterizedSig,baseType.getErasureSignature(),arguments); + return TypeFactory.createUnresolvedParameterizedType(parameterizedSig,baseTypeSignature,arguments); } // Convert the source type binding for a generic type into a generic UnresolvedType |