felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Unico Hommes (JIRA)" <j...@apache.org>
Subject [jira] Created: (FELIX-2745) New configurations throws NPE
Date Sun, 26 Dec 2010 12:37:45 GMT
New configurations throws NPE

                 Key: FELIX-2745
                 URL: https://issues.apache.org/jira/browse/FELIX-2745
             Project: Felix
          Issue Type: Bug
          Components: File Install
    Affects Versions: fileinstall-3.1.2
            Reporter: Unico Hommes

Line 216:

        Hashtable old = new Hashtable(new DictionaryAsMap(config.getProperties()));

in ConfigInstaller.java causes NPE when the configuration is new because config.getProperties
returns null.

I fixed the problem by changing the code to:

        Dictionary dict = config.getProperties();
        if (dict == null) dict = new Hashtable();

        Hashtable old = new Hashtable(new DictionaryAsMap(dict));

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

View raw message