You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Alex Miller (JIRA)" <ji...@apache.org> on 2008/04/10 22:28:04 UTC
[jira] Created: (IO-163) FileUtils.toURLs() uses deprecated (and
bad) method of conversion to URL
FileUtils.toURLs() uses deprecated (and bad) method of conversion to URL
------------------------------------------------------------------------
Key: IO-163
URL: https://issues.apache.org/jira/browse/IO-163
Project: Commons IO
Issue Type: Bug
Components: Utilities
Affects Versions: 1.4
Reporter: Alex Miller
Priority: Minor
The method FileUtils.toURLs() uses the following method to convert from File to URL:
File.toURL();
This method has scary warnings that it's a bad way to do the conversion because characters will not be escaped as required in URL strings. In Java 1.6, this method has actually been deprecated. All recent JDK versions recommend instead using:
File.toURI().toURL();
as the URI code will properly perform the escaping.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (IO-163) FileUtils.toURLs() uses deprecated (and
bad) method of conversion to URL
Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/IO-163?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Niall Pemberton resolved IO-163.
--------------------------------
Resolution: Fixed
Fix Version/s: 2.0
Assignee: Niall Pemberton
Fixed thanks
http://svn.apache.org/viewvc?view=rev&revision=647000
> FileUtils.toURLs() uses deprecated (and bad) method of conversion to URL
> ------------------------------------------------------------------------
>
> Key: IO-163
> URL: https://issues.apache.org/jira/browse/IO-163
> Project: Commons IO
> Issue Type: Bug
> Components: Utilities
> Affects Versions: 1.4
> Reporter: Alex Miller
> Assignee: Niall Pemberton
> Priority: Minor
> Fix For: 2.0
>
>
> The method FileUtils.toURLs() uses the following method to convert from File to URL:
> File.toURL();
> This method has scary warnings that it's a bad way to do the conversion because characters will not be escaped as required in URL strings. In Java 1.6, this method has actually been deprecated. All recent JDK versions recommend instead using:
> File.toURI().toURL();
> as the URI code will properly perform the escaping.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.