]
Edson Tirelli reassigned JBRULES-2388:
--------------------------------------
Assignee: Edson Tirelli (was: Mark Proctor)
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: Edson Tirelli
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 DroolsObjectInputStream.getClassLoader() instead.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: