]> source.dussan.org Git - aspectj.git/commitdiff
475728, 432874
authorAndy Clement <aclement@pivotal.io>
Wed, 2 Sep 2015 16:05:35 +0000 (09:05 -0700)
committerAndy Clement <aclement@pivotal.io>
Wed, 2 Sep 2015 16:05:35 +0000 (09:05 -0700)
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java

index 5c1ae918be1455fa7ca8cc97699ee1d54addd8de..584a14c8d2ee465261655ba29584f76c676ae5d6 100644 (file)
@@ -901,6 +901,11 @@ public class BcelObjectType extends AbstractReferenceTypeDelegate {
 
                // try finding outer class name by assuming standard class name mangling convention of javac for this class
                int lastDollar = className.lastIndexOf('$');
+               if (lastDollar == -1) {
+                       // Is this class damaged/obfuscated? Why did we think it was nested but couldn't find the parent using
+                       // the attributes above. For now just ignore it... I wonder when ignoring this will come back to bite!
+                       return null;
+               }
                String superClassName = className.substring(0, lastDollar);
                UnresolvedType outer = UnresolvedType.forName(superClassName);
                return outer.resolve(getResolvedTypeX().getWorld());