You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2016/04/27 01:55:16 UTC
svn commit: r1741122 -
/commons/proper/io/trunk/src/main/java/org/apache/commons/io/FileSystemUtils.java
Author: ggregory
Date: Tue Apr 26 23:55:15 2016
New Revision: 1741122
URL: http://svn.apache.org/viewvc?rev=1741122&view=rev
Log:
[IO-502] Exceptions are suppressed incorrectly when copying files. Fix NPEs due to the patch.
Modified:
commons/proper/io/trunk/src/main/java/org/apache/commons/io/FileSystemUtils.java
Modified: commons/proper/io/trunk/src/main/java/org/apache/commons/io/FileSystemUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/main/java/org/apache/commons/io/FileSystemUtils.java?rev=1741122&r1=1741121&r2=1741122&view=diff
==============================================================================
--- commons/proper/io/trunk/src/main/java/org/apache/commons/io/FileSystemUtils.java (original)
+++ commons/proper/io/trunk/src/main/java/org/apache/commons/io/FileSystemUtils.java Tue Apr 26 23:55:15 2016
@@ -510,6 +510,23 @@ public class FileSystemUtils {
"Command line did not return any info " +
"for command " + Arrays.asList(cmdAttribs));
}
+
+ inr.close();
+ inr = null;
+
+ in.close();
+ in = null;
+
+ if (out != null) {
+ out.close();
+ out = null;
+ }
+
+ if (err != null) {
+ err.close();
+ err = null;
+ }
+
return lines;
} catch (final InterruptedException ex) {