Bug 118337

Summary: Use weaver's ClassLoader not the usingClassLoader in 1.5 factory
Product: [Tools] AspectJ Reporter: Ron Bodkin <rbodkin+LISTS>
Component: CompilerAssignee: aspectj inbox <aspectj-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: DEVELOPMENT   
Target Milestone: 1.5.0RC1   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Ron Bodkin CLA 2005-11-28 20:24:36 EST
In ReflectionBasedReferenceTypeDelegateFactory this line (44) of code is breaking my use of the weaver for looking up bootstrap classes (where the classloader is null and the AspectJ weaver isn't accessible to the bootstrap loader). The commented out code works just fine for me. 

Is there a real need to resolve the AspectJ runtime from a different classloader than the one that was already used to load this class from the AspectJ runtime?

			Class delegateClass = Class.forName("org.aspectj.weaver.reflect.Java15ReflectionBasedReferenceTypeDelegate",false,usingClassLoader);//ReflectionBasedReferenceTypeDelegate.class.getClassLoader());
Comment 1 Adrian Colyer CLA 2005-11-29 06:43:43 EST
I've had this every which way in the last few days. In each variant something fails.... but I agree that it should assume that weaver5 types are coming from the same place that other weaver types came from. I'm going to put this back again and take another look at the failures it caused to see if there is something else still missing...
Comment 2 Adrian Colyer CLA 2005-11-29 14:40:54 EST
fix commited back in tree again...