From 43166c3e88e824e8709d50b243121740b0a1e81b Mon Sep 17 00:00:00 2001 From: Andy Clement Date: Tue, 27 Nov 2012 17:35:48 -0800 Subject: [PATCH] 325731 --- .../src/org/aspectj/weaver/ReferenceType.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java b/org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java index 97e9f5fc6..c8b1c777f 100644 --- a/org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java +++ b/org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java @@ -1031,11 +1031,13 @@ public class ReferenceType extends ResolvedType { ret.append(rawSig.substring(0, rawSig.length() - 1)); ret.append("<"); for (int i = 0; i < someParameters.length; i++) { - try { - ret.append(((ReferenceType) someParameters[i]).getSignatureForAttribute()); - } catch (ClassCastException cce) { - throw new IllegalStateException("DebugFor325731: expected a ReferenceType but was " + someParameters[i] - + " of type " + someParameters[i].getClass().getName(), cce); + if (someParameters[i] instanceof ReferenceType) { + ret.append(((ReferenceType)someParameters[i]).getSignatureForAttribute()); + } else if (someParameters[i] instanceof Primitive) { + ret.append(((Primitive)someParameters[i]).getSignatureForAttribute()); + } else { + throw new IllegalStateException("DebugFor325731: expected a ReferenceType or Primitive but was " + someParameters[i] + + " of type " + someParameters[i].getClass().getName()); } } ret.append(">;"); -- 2.39.5