Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.5.4
-
Fix Version/s: 1.5.5, 1.6-beta-1
-
Component/s: None
-
Labels:None
-
Number of attachments :
Description
ProxyGenerator uses classloader of base class (or classloader of one of interfaces) for proxy class loading.
There are several cases when this default behaviour is inappropriate.
For instance, in OSGI environment if you are trying to generate proxy for some class in bundle different from current bundle, using of base classes classloader leads to NoClassDefFoundError.
Sample code:
import org.eclipse.debug.core.model.*
([:] as LineBreakpoint)
this code throws exception:
java.lang.NoClassDefFoundError: groovy/lang/Script.
Of course, plugin of LineBreakpoint class (org.eclipse.debug.core)
does not know about groovy classes, so it can not find Script class.
In this case ability to set classloader explicitly will be very useful.
Full discussion can be found here:
http://groovy.markmail.org/message/hleawq7pedcowbhg
fixed in trunk and merged onto the 1.5.x branch