You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by "Christoph Leuzinger (JIRA)" <ji...@apache.org> on 2014/06/06 15:24:01 UTC

[jira] [Created] (BATIK-1076) NPE in LocalizableSupport when loaded by the bootstrap classloader

Christoph Leuzinger created BATIK-1076:
------------------------------------------

             Summary: NPE in LocalizableSupport when loaded by the bootstrap classloader
                 Key: BATIK-1076
                 URL: https://issues.apache.org/jira/browse/BATIK-1076
             Project: Batik
          Issue Type: Bug
    Affects Versions: 1.7
            Reporter: Christoph Leuzinger
            Priority: Minor


We've encountered a NPE when running our application with Batik on the endorsed classpath. The problem lies in {{LocalizableSupport.lookupResourceBundle()}}:

{code:title=LocalizableSupport.java, line 272}
if (cl == null)
    cl = getClass().getClassLoader();
    try {
        rb = ResourceBundle.getBundle(bundle, usedLocale, cl);
    } catch (MissingResourceException mre) {
}
{code}

Because the class has been loaded by the bootstrap classloader, {{getClass().getClassLoader()}} will return {{null}} and lead to a NPE in {{ResourceBundle.getBundle()}}.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

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