svn commit: r1811935 - in /tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/scan: FileUrlJar.java Jar.java UrlJar.java

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

svn commit: r1811935 - in /tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/scan: FileUrlJar.java Jar.java UrlJar.java

markt
Author: markt
Date: Thu Oct 12 10:06:48 2017
New Revision: 1811935

URL: http://svn.apache.org/viewvc?rev=1811935&view=rev
Log:
Deprecate an unused method on the internal Jar abstraction

Modified:
    tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/scan/FileUrlJar.java
    tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/scan/Jar.java
    tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/scan/UrlJar.java

Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/scan/FileUrlJar.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/scan/FileUrlJar.java?rev=1811935&r1=1811934&r2=1811935&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/scan/FileUrlJar.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/scan/FileUrlJar.java Thu Oct 12 10:06:48 2017
@@ -42,9 +42,9 @@ public class FileUrlJar implements Jar {
     }
 
     @Override
+    @Deprecated
     public boolean entryExists(String name) {
-        ZipEntry entry = jarFile.getEntry(name);
-        return entry != null;
+        return false;
     }
 
     @Override

Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/scan/Jar.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/scan/Jar.java?rev=1811935&r1=1811934&r2=1811935&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/scan/Jar.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/scan/Jar.java Thu Oct 12 10:06:48 2017
@@ -34,9 +34,14 @@ public interface Jar {
      * Determines if a specific entry exists within the JAR.
      *
      * @param name  Entry to look for
-     * @return      <code>true</code> if the specified entry exists else
-     *               <code>false</code>
+     * @return      Implementations will always return {@code false}
+     *
+     * @throws IOException if an I/O error occurs while processing the JAR file
+     *   entries
+     *
+     * @deprecated Unused.
      */
+    @Deprecated
     boolean entryExists(String name) throws IOException;
 
 

Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/scan/UrlJar.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/scan/UrlJar.java?rev=1811935&r1=1811934&r2=1811935&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/scan/UrlJar.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/scan/UrlJar.java Thu Oct 12 10:06:48 2017
@@ -39,16 +39,9 @@ public class UrlJar implements Jar {
     }
 
     @Override
+    @Deprecated
     public boolean entryExists(String name) throws IOException {
-        JarEntry entry = jarInputStream.getNextJarEntry();
-        while (entry != null) {
-            if (name.equals(entry.getName())) {
-                break;
-            }
-            entry = jarInputStream.getNextJarEntry();
-        }
-
-        return entry != null;
+        return false;
     }
 
     @Override



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