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.

Reply via email to