From 9b220fe52ad9bb117140692f7cf455d78a17be11 Mon Sep 17 00:00:00 2001 From: Andy Clement Date: Mon, 7 Dec 2015 16:09:21 -0800 Subject: [PATCH] 482945: obfuscated class file finding outer class --- .../aspectj/weaver/AbstractReferenceTypeDelegate.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/AbstractReferenceTypeDelegate.java b/org.aspectj.matcher/src/org/aspectj/weaver/AbstractReferenceTypeDelegate.java index f73504927..46f12c04e 100644 --- a/org.aspectj.matcher/src/org/aspectj/weaver/AbstractReferenceTypeDelegate.java +++ b/org.aspectj.matcher/src/org/aspectj/weaver/AbstractReferenceTypeDelegate.java @@ -107,9 +107,13 @@ public abstract class AbstractReferenceTypeDelegate implements ReferenceTypeDele List typeParameters = new ArrayList(); ResolvedType outerClassType = getOuterClass(); if (!(outerClassType instanceof ReferenceType)) { - throw new BCException("Whilst processing type '" + this.resolvedTypeX.getSignature() - + "' - cannot cast the outer type to a reference type. Signature=" + outerClassType.getSignature() - + " toString()=" + outerClassType.toString()); + if (outerClassType == null) { + return GenericSignature.FormalTypeParameter.NONE; + } else { + throw new BCException("Whilst processing type '" + this.resolvedTypeX.getSignature() + + "' - cannot cast the outer type to a reference type. Signature=" + outerClassType.getSignature() + + " toString()=" + outerClassType.toString()); + } } ReferenceType outer = (ReferenceType) outerClassType; ReferenceTypeDelegate outerDelegate = outer.getDelegate(); -- 2.39.5