commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 35147] New: - [digester] Class.getClassLoader() is not reliable
Date Tue, 31 May 2005 22:38:03 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=35147>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=35147

           Summary: [digester] Class.getClassLoader() is not reliable
           Product: Commons
           Version: 1.6 Final
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Digester
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: w-zwicky@cecer.army.mil


Digester uses Class.getClassLoader() in numerous places, however this method is
documented as being able to return null, which it does under the custom Java in
Bentley MicroStation.  (In fact, *every* method that returns a classloader
actually returns null.)

It turns out that it's not necessary to use ClassLoader at all; Class offers
every method you need, and works every time.  So I made that patch -- using
Class.forName and Class.getResource instead of the ClassLoader versions.  It
works fine now.

If there's no reason to stick with ClassLoader, I'd suggest making this change
in the main code base.  I can't submit mine, as I have no good way to make a
patchfile.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message