svn commit: r1811932 - in /tomcat/trunk/java/org/apache/tomcat: Jar.java util/scan/AbstractInputStreamJar.java util/scan/JarFileUrlJar.java

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

svn commit: r1811932 - in /tomcat/trunk/java/org/apache/tomcat: Jar.java util/scan/AbstractInputStreamJar.java util/scan/JarFileUrlJar.java

markt
Author: markt
Date: Thu Oct 12 10:02:29 2017
New Revision: 1811932

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

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

Modified: tomcat/trunk/java/org/apache/tomcat/Jar.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/Jar.java?rev=1811932&r1=1811931&r2=1811932&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/Jar.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/Jar.java Thu Oct 12 10:02:29 2017
@@ -43,12 +43,14 @@ public interface Jar extends AutoCloseab
      * 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. This will be removed in Tomcat 9 onwards.
      */
+    @Deprecated
     boolean entryExists(String name) throws IOException;
 
 

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=1811932&r1=1811931&r2=1811932&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/scan/AbstractInputStreamJar.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/scan/AbstractInputStreamJar.java Thu Oct 12 10:02:29 2017
@@ -81,9 +81,9 @@ public abstract class AbstractInputStrea
 
 
     @Override
+    @Deprecated
     public boolean entryExists(String name) throws IOException {
-        gotoEntry(name);
-        return entry != null;
+        return false;
     }
 
 

Modified: tomcat/trunk/java/org/apache/tomcat/util/scan/JarFileUrlJar.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/scan/JarFileUrlJar.java?rev=1811932&r1=1811931&r2=1811932&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/scan/JarFileUrlJar.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/scan/JarFileUrlJar.java Thu Oct 12 10:02:29 2017
@@ -70,9 +70,9 @@ public class JarFileUrlJar implements Ja
 
 
     @Override
+    @Deprecated
     public boolean entryExists(String name) {
-        ZipEntry entry = jarFile.getEntry(name);
-        return entry != null;
+        return false;
     }
 
     @Override



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