commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1775882 - /commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/bytesource/ByteSourceFile.java
Date Fri, 23 Dec 2016 18:26:55 GMT
Author: ggregory
Date: Fri Dec 23 18:26:55 2016
New Revision: 1775882

URL: http://svn.apache.org/viewvc?rev=1775882&view=rev
Log:
Local variable is not needed.

Modified:
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/bytesource/ByteSourceFile.java

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/bytesource/ByteSourceFile.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/bytesource/ByteSourceFile.java?rev=1775882&r1=1775881&r2=1775882&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/bytesource/ByteSourceFile.java
(original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/bytesource/ByteSourceFile.java
Fri Dec 23 18:26:55 2016
@@ -64,8 +64,7 @@ public class ByteSourceFile extends Byte
     public byte[] getAll() throws IOException {
         final ByteArrayOutputStream baos = new ByteArrayOutputStream();
 
-        try (FileInputStream fis = new FileInputStream(file);
-                InputStream is = new BufferedInputStream(fis)) {
+        try (InputStream is = new BufferedInputStream(new FileInputStream(file))) {
             final byte[] buffer = new byte[1024];
             int read;
             while ((read = is.read(buffer)) > 0) {



Mime
View raw message