commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1038094 - /commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/tar/TarInputStream.java
Date Tue, 23 Nov 2010 12:58:36 GMT
Author: sebb
Date: Tue Nov 23 12:58:36 2010
New Revision: 1038094

URL: http://svn.apache.org/viewvc?rev=1038094&view=rev
Log:
Simplify code and avoid potential NPE warning

Modified:
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/tar/TarInputStream.java

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/tar/TarInputStream.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/tar/TarInputStream.java?rev=1038094&r1=1038093&r2=1038094&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/tar/TarInputStream.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/tar/TarInputStream.java
Tue Nov 23 12:58:36 2010
@@ -144,6 +144,7 @@ class TarInputStream
                 debug("READ NULL RECORD");
             }
             hasHitEOF = true;
+            currEntry = null;
         }
         else if (buffer.isEOFRecord(headerBuf))
         {
@@ -152,10 +153,6 @@ class TarInputStream
                 debug("READ EOF RECORD");
             }
             hasHitEOF = true;
-        }
-
-        if (hasHitEOF)
-        {
             currEntry = null;
         }
         else



Mime
View raw message