tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1742184 - /tomcat/trunk/java/org/apache/tomcat/util/scan/UrlJar.java
Date Tue, 03 May 2016 19:48:47 GMT
Author: markt
Date: Tue May  3 19:48:47 2016
New Revision: 1742184

URL: http://svn.apache.org/viewvc?rev=1742184&view=rev
Log:
Need to reset the JarInputStream before scanning for the required resource.

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

Modified: tomcat/trunk/java/org/apache/tomcat/util/scan/UrlJar.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/scan/UrlJar.java?rev=1742184&r1=1742183&r2=1742184&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/scan/UrlJar.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/scan/UrlJar.java Tue May  3 19:48:47 2016
@@ -45,6 +45,7 @@ public class UrlJar implements Jar {
 
     @Override
     public boolean entryExists(String name) throws IOException {
+        reset();
         JarEntry entry = jarInputStream.getNextJarEntry();
         while (entry != null) {
             if (name.equals(entry.getName())) {
@@ -58,6 +59,7 @@ public class UrlJar implements Jar {
 
     @Override
     public InputStream getInputStream(String name) throws IOException {
+        reset();
         JarEntry entry = jarInputStream.getNextJarEntry();
         while (entry != null) {
             if (name.equals(entry.getName())) {
@@ -75,6 +77,7 @@ public class UrlJar implements Jar {
 
     @Override
     public long getLastModified(String name) throws IOException {
+        reset();
         JarEntry entry = jarInputStream.getNextJarEntry();
         while (entry != null) {
             if (name.equals(entry.getName())) {



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message