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 2019/10/17 21:35:47 UTC

[commons-vfs] branch master updated: Don't need local var.

This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-vfs.git


The following commit(s) were added to refs/heads/master by this push:
     new 17581cd  Don't need local var.
17581cd is described below

commit 17581cd4459d77a6bece81e88d9438818a9a54dc
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Oct 17 17:35:42 2019 -0400

    Don't need local var.
---
 .../org/apache/commons/vfs2/provider/bzip2/Bzip2FileObject.java     | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/bzip2/Bzip2FileObject.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/bzip2/Bzip2FileObject.java
index 3f81bac..8ff94f8 100644
--- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/bzip2/Bzip2FileObject.java
+++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/bzip2/Bzip2FileObject.java
@@ -54,8 +54,7 @@ public class Bzip2FileObject extends CompressedFileFileObject<Bzip2FileSystem> {
     @Override
     protected InputStream doGetInputStream(final int bufferSize) throws Exception {
         // check file
-        final InputStream is = getContainer().getContent().getInputStream(bufferSize);
-        return wrapInputStream(getName().getURI(), is);
+        return wrapInputStream(getName().getURI(), getContainer().getContent().getInputStream(bufferSize));
     }
 
     public static InputStream wrapInputStream(final String name, final InputStream inputStream) throws IOException {
@@ -64,8 +63,7 @@ public class Bzip2FileObject extends CompressedFileFileObject<Bzip2FileSystem> {
 
     @Override
     protected OutputStream doGetOutputStream(final boolean bAppend) throws Exception {
-        final OutputStream os = getContainer().getContent().getOutputStream(false);
-        return new BZip2CompressorOutputStream(os);
+        return new BZip2CompressorOutputStream(getContainer().getContent().getOutputStream(false));
     }
 
     private static Bzip2FileSystem cast(final CompressedFileFileSystem fs) {