[ 
https://issues.apache.org/jira/browse/DIGESTER-118?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Simone Tripodi resolved DIGESTER-118.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 3.0
         Assignee: Simone Tripodi

The fix contains a little variant respect to the proposed suggestion: users can 
still create classes by specifying just the class name, but when passed the 
Class object in the constructor, it doesn't need to be load dynamically.
See org.apache.commons.digester3.ObjectCreateRule r1138914

> ObjectCreateRule shouldn't keep className as a field
> ----------------------------------------------------
>
>                 Key: DIGESTER-118
>                 URL: https://issues.apache.org/jira/browse/DIGESTER-118
>             Project: Commons Digester
>          Issue Type: Bug
>    Affects Versions: 1.7
>            Reporter: Kohsuke Kawaguchi
>            Assignee: Simone Tripodi
>             Fix For: 3.0
>
>
> Currently ObjectCreateRule refers to the class by using the name, but this is 
> highly undesirable.
> 1. "begin" uses the classloader that loaded Digester to resolve this class 
> name, but this won't work in multi-classloader environment (like IDE, Maven, 
> etc.)
> 2. "begin" invokes the loadClass method each time a new object is created. 
> This is unnecessary performance hit.
> The proper thing to do is to retain the Class object, and convert String to 
> Class in the constructor.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to