You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Dennis Lundberg (JIRA)" <ji...@apache.org> on 2009/12/29 18:02:29 UTC

[jira] Updated: (LOGGING-13) [logging] NullPointException when Logger.getClassLoader returns null

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

Dennis Lundberg updated LOGGING-13:
-----------------------------------

    Fix Version/s: 1.1.0

> [logging] NullPointException when Logger.getClassLoader returns null
> --------------------------------------------------------------------
>
>                 Key: LOGGING-13
>                 URL: https://issues.apache.org/jira/browse/LOGGING-13
>             Project: Commons Logging
>          Issue Type: Bug
>    Affects Versions: Nightly Builds
>         Environment: Operating System: All
> Platform: PC
>            Reporter: Adam Jack
>            Priority: Critical
>             Fix For: 1.1.0
>
>         Attachments: LogFactory.java, LogFactory.java, patch.txt, patch.txt
>
>
> getClassLoader can return null to imply the Boot Class Loader (per JDK 1.3 
> documentatio at least) however unfortunately commons logging is not coded to 
> support that.
> There are at least two places where this is a problem & commons logging dies w/ 
> a NullPointerException, one in a Hashtable (used as a key to factory) [HashMap 
> allows null key, Hashtable does not] and one other more directly.
> I modified the code to use the ClassLoader.getSystemClassLoader() when a null 
> was returned for Logger.getClassLoader() -- assuming ['cos I had no better 
> guess/choice] that System == Boot [since there was no getBootClassLoader.] This 
> appears to be working.
> I can send my modified code if interested.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.