commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Miller (JIRA)" <j...@apache.org>
Subject [jira] Created: (IO-163) FileUtils.toURLs() uses deprecated (and bad) method of conversion to URL
Date Thu, 10 Apr 2008 20:28:04 GMT
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.


Mime
View raw message