You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ch...@apache.org on 2017/05/24 18:41:00 UTC

[12/50] [abbrv] commons-imaging git commit: Local variable is not needed.

Local variable is not needed.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/imaging/trunk@1775882 13f79535-47bb-0310-9956-ffa450edef68


Project: http://git-wip-us.apache.org/repos/asf/commons-imaging/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-imaging/commit/0ac4d259
Tree: http://git-wip-us.apache.org/repos/asf/commons-imaging/tree/0ac4d259
Diff: http://git-wip-us.apache.org/repos/asf/commons-imaging/diff/0ac4d259

Branch: refs/heads/master
Commit: 0ac4d259f5d9d44cade33f2b7d38f8cf34dda80c
Parents: 1743e64
Author: Gary D. Gregory <gg...@apache.org>
Authored: Fri Dec 23 18:26:55 2016 +0000
Committer: Gary D. Gregory <gg...@apache.org>
Committed: Fri Dec 23 18:26:55 2016 +0000

----------------------------------------------------------------------
 .../apache/commons/imaging/common/bytesource/ByteSourceFile.java  | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-imaging/blob/0ac4d259/src/main/java/org/apache/commons/imaging/common/bytesource/ByteSourceFile.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/imaging/common/bytesource/ByteSourceFile.java b/src/main/java/org/apache/commons/imaging/common/bytesource/ByteSourceFile.java
index 87adbd8..a48381a 100644
--- a/src/main/java/org/apache/commons/imaging/common/bytesource/ByteSourceFile.java
+++ b/src/main/java/org/apache/commons/imaging/common/bytesource/ByteSourceFile.java
@@ -64,8 +64,7 @@ public class ByteSourceFile extends ByteSource {
     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) {