John D. Ament created GERONIMO-6592:
---------------------------------------

             Summary: PropertyFileConfigSource throws NPE when passed in URL 
doesn't match a file
                 Key: GERONIMO-6592
                 URL: https://issues.apache.org/jira/browse/GERONIMO-6592
             Project: Geronimo
          Issue Type: Bug
      Security Level: public (Regular issues)
          Components: Config
    Affects Versions: Config_1.0
            Reporter: John D. Ament
            Assignee: John D. Ament
             Fix For: Config_1.1


Suppose you have a setup like this:

{code}
URL url = Paths.get("some/missing/File.txt").toUri().toURL();
PropertyFileConfigSource propertyFileConfigSource = new 
PropertyFileConfigSource(url);
{code}

The instantiation of the config source will throw a NPE when the URL doesn't 
exist.  This is because when catching the first IOException we return null, but 
it would make more sense to let it continue and return the empty map.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to