]
Edson Tirelli updated JBRULES-2388:
-----------------------------------
Component/s: drools-compiler
drools-core
Fix Version/s: 5.0.2
5.1.0.M2
Affects Version/s: 5.0.1.FINAL
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)
Components: drools-compiler, drools-core
Affects Versions: 5.0.1.FINAL, 5.1.0.M1
Reporter: Tihomir Surdilovic
Assignee: Edson Tirelli
Fix For: 5.0.2, 5.1.0.M2
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: