[jboss-jira] [JBoss JIRA] Created: (JBRULES-2388) When resolving Enums, Drools should look for the proper classloader and not use the default one
Tihomir Surdilovic (JIRA)
jira-events at lists.jboss.org
Mon Dec 21 12:02:36 EST 2009
When resolving Enums, Drools should look for the proper classloader and not use the default one
-----------------------------------------------------------------------------------------------
Key: JBRULES-2388
URL: https://jira.jboss.org/jira/browse/JBRULES-2388
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 5.1.0.M1
Reporter: Tihomir Surdilovic
Assignee: Mark Proctor
org.drools.base.field.ObjectFieldImpl.java:
private void resolveEnumValue() {
try {
final Class<?> staticClass = Class.forName( enumName );
value = (Serializable) staticClass.getField( fieldName ).get( null );
} catch ( final Exception e ) {
throw new RuntimeDroolsException("Error deserializing enum value "+enumName+"."+fieldName+" : "+e.getMessage());
}
}
Here Class.forName should not be used in the case where it was loaded with a different CL. Should get CL from in.getClassLoader() instead.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list