Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 74242 invoked from network); 14 Oct 2010 00:59:55 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 14 Oct 2010 00:59:55 -0000 Received: (qmail 621 invoked by uid 500); 14 Oct 2010 00:59:55 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 558 invoked by uid 500); 14 Oct 2010 00:59:55 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 550 invoked by uid 99); 14 Oct 2010 00:59:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Oct 2010 00:59:55 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Oct 2010 00:59:54 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o9E0xYOF027752 for ; Thu, 14 Oct 2010 00:59:34 GMT Message-ID: <10487006.135171287017974710.JavaMail.jira@thor> Date: Wed, 13 Oct 2010 20:59:34 -0400 (EDT) From: "Niall Pemberton (JIRA)" To: issues@commons.apache.org Subject: [jira] Resolved: (IO-252) NumberFormatException from FileUtils.toFile method In-Reply-To: <25037561.135001287016893110.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ 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.