NumberFormatException from FileUtils.toFile method
--------------------------------------------------
Key: IO-252
URL: https://issues.apache.org/jira/browse/IO-252
Project: Commons IO
Issue Type: Bug
Components: Utilities
Affects Versions: 1.4
Reporter: Valrith
Certain strings can cause the org.apache.commons.io.FileUtils.toFile(URL url)
method to call Integer.parseInt with an invalid argument and thus throw a
NumberFormatException:
Exception in thread "main" java.lang.NumberFormatException: For input string:
"%2"
at
java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Integer.parseInt(Integer.java:449)
at org.apache.commons.io.FileUtils.toFile(FileUtils.java:476)
One example of such a string: "both%20are%20100%20%25%20true"
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.