[
https://jira.jboss.org/jira/browse/JBRULES-2388?page=com.atlassian.jira.p...
]
Tihomir Surdilovic updated JBRULES-2388:
----------------------------------------
Description:
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.
was:
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.
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 DroolsObjectInputStream.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