Community
Participate
Working Groups
Hi, in the past days I experienced a bug in the org.aspectj.weaver plug-in using equinox load-time weaving. The problematic source code is contained in org.aspectj.weaver.bcel.BcelObjectType at lines 903-905 of the method getOuterClass(). The method should resolve the declaring class for a current inner class. The problematic code tries to resolve the declaring class using String operations. It assumes the compiled class to follow the javac naming conventions. If this isn't the case (like it can happen e.g. for obfuscated classes), a StringIndexOutOfBoundException is raised (since the javac-specific $ in the inner-classe's name wasn't found). This Exception is propagated and never catched which results in the class to be never loaded (neither woven nor unwoven). A NoClassDefFoundError is the result and the class loading process is broken in this moment. To fix this, properly the outerclass check should not rely on the javac assumption. A hotfix could be to catch the Exception to avoid a broken class loading process... Best regards, Lukas PS: A similar problem is maybe described in Bug 432874
Changes are in to 'give up' if we can't work it out, rather than throw the exception.