[jboss-jira] [JBoss JIRA] Updated: (JBRULES-2388) When resolving Enums, Drools should look for the proper classloader and not use the default one

Edson Tirelli (JIRA) jira-events at lists.jboss.org
Mon Dec 21 12:56:31 EST 2009


     [ https://jira.jboss.org/jira/browse/JBRULES-2388?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

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: 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