From: aclement Date: Mon, 13 Dec 2010 20:31:12 +0000 (+0000) Subject: 332388: test and fix X-Git-Tag: V1_6_11RC1~40 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=bd5cd17934f61a9e626455b424f4004127f38d94;p=aspectj.git 332388: test and fix --- diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelGenericSignatureToTypeXConverter.java b/weaver/src/org/aspectj/weaver/bcel/BcelGenericSignatureToTypeXConverter.java index dc7729830..081bdd5f7 100644 --- a/weaver/src/org/aspectj/weaver/bcel/BcelGenericSignatureToTypeXConverter.java +++ b/weaver/src/org/aspectj/weaver/bcel/BcelGenericSignatureToTypeXConverter.java @@ -14,6 +14,7 @@ package org.aspectj.weaver.bcel; import java.util.HashMap; import java.util.Map; +import org.aspectj.bridge.Message; import org.aspectj.util.GenericSignature; import org.aspectj.util.GenericSignature.SimpleClassTypeSignature; import org.aspectj.weaver.BoundedReferenceType; @@ -161,12 +162,24 @@ public class BcelGenericSignatureToTypeXConverter { if (aTypeArgument.isMinus) { UnresolvedType bound = fieldTypeSignature2TypeX(aTypeArgument.signature, typeParams, world, inProgressTypeVariableResolutions); - ReferenceType rBound = (ReferenceType) world.resolve(bound); + ResolvedType resolvedBound = world.resolve(bound); + if (resolvedBound.isMissing()) { + world.getMessageHandler().handleMessage( + new Message("Unable to find type (for bound): " + resolvedBound.getName(), null, true)); + resolvedBound = world.resolve(UnresolvedType.OBJECT); + } + ReferenceType rBound = (ReferenceType) resolvedBound; return new BoundedReferenceType(rBound, false, world); } else if (aTypeArgument.isPlus) { UnresolvedType bound = fieldTypeSignature2TypeX(aTypeArgument.signature, typeParams, world, inProgressTypeVariableResolutions); - ReferenceType rBound = (ReferenceType) world.resolve(bound); + ResolvedType resolvedBound = world.resolve(bound); + if (resolvedBound.isMissing()) { + world.getMessageHandler().handleMessage( + new Message("Unable to find type (for bound): " + resolvedBound.getName(), null, true)); + resolvedBound = world.resolve(UnresolvedType.OBJECT); + } + ReferenceType rBound = (ReferenceType) resolvedBound; return new BoundedReferenceType(rBound, true, world); } else { return fieldTypeSignature2TypeX(aTypeArgument.signature, typeParams, world, inProgressTypeVariableResolutions);