Bug 311762 - Spring passes in a garbage classname and AspectJ reports an error
Summary: Spring passes in a garbage classname and AspectJ reports an error
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: DEVELOPMENT   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 1.6.9M2   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-05 12:19 EDT by Andrew Clement CLA
Modified: 2010-05-13 13:48 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Clement CLA 2010-05-05 12:19:07 EDT
There was a bug/feature in Spring 2.5.5 that created a silly classname that was of an invalid format. names like: '[Lorg.quartz.Trigger;Editor'
which result in:

org.aspectj.weaver.BCException: Do not call nameToSignature with something that looks like a signature (descriptor): '[Lorg.quartz.Trigger;Editor'

at org.aspectj.weaver.UnresolvedType.nameToSignature(UnresolvedType.java:650)
at org.aspectj.weaver.UnresolvedType.forName(UnresolvedType.java:244)
at org.aspectj.weaver.ExtensibleURLClassLoader.getBytes(ExtensibleURLClassLoader.java:70)
at org.aspectj.weaver.loadtime.WeavingURLClassLoader.getBytes(WeavingURLClassLoader.java:165)
at org.aspectj.weaver.ExtensibleURLClassLoader.findClass(ExtensibleURLClassLoader.java:50)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)

the BCException is really an assert - it is meant to catch incorrect signature manipulation internally to AspectJ but does catch this situation too.  We should perhaps be more lenient if garbage comes in from outside.
Comment 1 Andrew Clement CLA 2010-05-05 12:52:14 EDT
exception handled internally if bad names found in the classloading route into the weaver