From bd5cd17934f61a9e626455b424f4004127f38d94 Mon Sep 17 00:00:00 2001 From: aclement Date: Mon, 13 Dec 2010 20:31:12 +0000 Subject: [PATCH] 332388: test and fix --- .../BcelGenericSignatureToTypeXConverter.java | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) 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); -- 2.39.5