You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Sebb (JIRA)" <ji...@apache.org> on 2012/06/07 14:06:23 UTC
[jira] [Created] (IO-334) FileUtils.toURLs throws NPE for null
parameter; this is inconsistent with toFiles method behaviour
Sebb created IO-334:
-----------------------
Summary: FileUtils.toURLs throws NPE for null parameter; this is inconsistent with toFiles method behaviour
Key: IO-334
URL: https://issues.apache.org/jira/browse/IO-334
Project: Commons IO
Issue Type: Bug
Reporter: Sebb
Priority: Trivial
The toFiles method treats null input the same as an empty array, however the toURLs method throws NPE for null input.
This is inconsistent.
The Javadoc for toURLs does not specify the behaviour for null input.
Either the method should be fixed to treat null as an empty array, or the NPE should be documented.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (IO-334) FileUtils.toURLs throws NPE for null
parameter; this is inconsistent with toFiles method behaviour
Posted by "Sebb (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/IO-334?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sebb resolved IO-334.
---------------------
Resolution: Fixed
Fix Version/s: 2.4
> FileUtils.toURLs throws NPE for null parameter; this is inconsistent with toFiles method behaviour
> --------------------------------------------------------------------------------------------------
>
> Key: IO-334
> URL: https://issues.apache.org/jira/browse/IO-334
> Project: Commons IO
> Issue Type: Bug
> Reporter: Sebb
> Priority: Trivial
> Fix For: 2.4
>
>
> The toFiles method treats null input the same as an empty array, however the toURLs method throws NPE for null input.
> This is inconsistent.
> The Javadoc for toURLs does not specify the behaviour for null input.
> Either the method should be fixed to treat null as an empty array, or the NPE should be documented.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira