commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niall Pemberton (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (IO-252) NumberFormatException from FileUtils.toFile method
Date Thu, 14 Oct 2010 00:59:34 GMT

     [ https://issues.apache.org/jira/browse/IO-252?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Niall Pemberton resolved IO-252.
--------------------------------

    Resolution: Duplicate

This is already fixed by IO-166 and will be available in the next release. I added a test
to prove this:

    http://svn.apache.org/viewvc?view=revision&revision=1022336

> 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
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> 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.


Mime
View raw message