svn commit: r1812401 - /tomcat/trunk/java/org/apache/tomcat/util/scan/AbstractInputStreamJar.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1812401 - /tomcat/trunk/java/org/apache/tomcat/util/scan/AbstractInputStreamJar.java

markt
Author: markt
Date: Tue Oct 17 13:20:42 2017
New Revision: 1812401

URL: http://svn.apache.org/viewvc?rev=1812401&view=rev
Log:
Correct refactored reset logic

Modified:
    tomcat/trunk/java/org/apache/tomcat/util/scan/AbstractInputStreamJar.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/scan/AbstractInputStreamJar.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/scan/AbstractInputStreamJar.java?rev=1812401&r1=1812400&r2=1812401&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/scan/AbstractInputStreamJar.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/scan/AbstractInputStreamJar.java Tue Oct 17 13:20:42 2017
@@ -189,8 +189,10 @@ public abstract class AbstractInputStrea
 
 
     private void gotoEntry(String name) throws IOException {
+        boolean needsReset = true;
         if (multiRelease == null) {
             reset();
+            needsReset = false;
         }
 
         // Need to convert requested name to multi-release name (if one exists)
@@ -207,6 +209,9 @@ public abstract class AbstractInputStrea
         if (entry != null && name.equals(entry.getName())) {
             return;
         }
+        if (needsReset) {
+            reset();
+        }
 
         JarEntry jarEntry = jarInputStream.getNextJarEntry();
         while (jarEntry != null) {



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]