You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Emmanuel Bourg (JIRA)" <ji...@apache.org> on 2007/04/26 00:42:15 UTC

[jira] Updated: (CONFIGURATION-46) [Configuration] Documentation Issue

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

Emmanuel Bourg updated CONFIGURATION-46:
----------------------------------------

    Fix Version/s: 1.0

> [Configuration] Documentation Issue
> -----------------------------------
>
>                 Key: CONFIGURATION-46
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-46
>             Project: Commons Configuration
>          Issue Type: Bug
>         Environment: Operating System: other
> Platform: Other
>            Reporter: Tim Reilly
>             Fix For: 1.0
>
>         Attachments: examples-patch.txt
>
>
> I think there's an error in the documentation for commons-configuration 
> examples page.
> If I use this example:
>    ConfigurationFactory factory = new ConfigurationFactory();
>    URL configURL = getClass().getResource("/config.xml");
>    factory.setConfigurationFileName(configURL.toString());
>    Configuration config = factory.getConfiguration();
> I get a NPE, but if I change to this:
>   ConfigurationFactory factory = new ConfigurationFactory();
>   URL configURL = getClass().getResource("/config.xml");
> - factory.setConfigurationFileName(configURL.toString());
> + factory.setConfigurationFileName(configURL.getFile());
>   Configuration config = factory.getConfiguration();
> everthing is fine. Basically, the setConfigFileName in ConfigurationFactory is 
> not expecting a URI its expecting a path i think?

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


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