commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1614791 - in /commons/proper/io/trunk/src: changes/changes.xml main/java/org/apache/commons/io/FileUtils.java
Date Wed, 30 Jul 2014 23:18:55 GMT
Author: sebb
Date: Wed Jul 30 23:18:55 2014
New Revision: 1614791

URL: http://svn.apache.org/r1614791
Log:
NET-453 - Regression in FileUtils.readFileToString from 2.0.1

Modified:
    commons/proper/io/trunk/src/changes/changes.xml
    commons/proper/io/trunk/src/main/java/org/apache/commons/io/FileUtils.java

Modified: commons/proper/io/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/changes/changes.xml?rev=1614791&r1=1614790&r2=1614791&view=diff
==============================================================================
--- commons/proper/io/trunk/src/changes/changes.xml (original)
+++ commons/proper/io/trunk/src/changes/changes.xml Wed Jul 30 23:18:55 2014
@@ -47,6 +47,9 @@ The <action> type attribute can be add,u
   <body>
     <!-- The release date is the date RC is cut -->
     <release version="2.5" date="2014-??-??" description="New features and bug fixes.">
+      <action issue="IO-453" dev="sebb" type="fix" due-to="Steven Christou">
+         Regression in FileUtils.readFileToString from 2.0.1
+      </action>
       <action issue="IO-451" dev="sebb" type="fix" due-to="David Standish">
          ant test fails - resources missing from test classpath
       </action>

Modified: commons/proper/io/trunk/src/main/java/org/apache/commons/io/FileUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/main/java/org/apache/commons/io/FileUtils.java?rev=1614791&r1=1614790&r2=1614791&view=diff
==============================================================================
--- commons/proper/io/trunk/src/main/java/org/apache/commons/io/FileUtils.java (original)
+++ commons/proper/io/trunk/src/main/java/org/apache/commons/io/FileUtils.java Wed Jul 30
23:18:55 2014
@@ -1799,7 +1799,7 @@ public class FileUtils {
         InputStream in = null;
         try {
             in = openInputStream(file);
-            return IOUtils.toByteArray(in, file.length());
+            return IOUtils.toByteArray(in); // Do NOT use file.length() - see NET-453
         } finally {
             IOUtils.closeQuietly(in);
         }



Mime
View raw message