tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1742093 - in /tomcat/trunk/java/org/apache/tomcat/util: descriptor/web/FragmentJarScannerCallback.java scan/StandardJarScanner.java
Date Tue, 03 May 2016 11:02:55 GMT
Author: markt
Date: Tue May  3 11:02:55 2016
New Revision: 1742093

URL: http://svn.apache.org/viewvc?rev=1742093&view=rev
Log:
Skip web-fragment.xml scan in WEB-INF/classes when scanning an unpacked WAR.
Move the test earlier:
- one test covers packed and unpacked WARs
- testing earlier is (marginally) more efficient

Modified:
    tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/FragmentJarScannerCallback.java
    tomcat/trunk/java/org/apache/tomcat/util/scan/StandardJarScanner.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/FragmentJarScannerCallback.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/FragmentJarScannerCallback.java?rev=1742093&r1=1742092&r2=1742093&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/FragmentJarScannerCallback.java
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/FragmentJarScannerCallback.java
Tue May  3 11:02:55 2016
@@ -111,11 +111,6 @@ public class FragmentJarScannerCallback
     @Override
     public void scan(File file, String webappPath, boolean isWebapp) throws IOException {
 
-        // Fragments unpacked in WEB-INF/classes are not handled
-        if ("/WEB-INF/classes".equals(webappPath)) {
-            return;
-        }
-
         WebXml fragment = new WebXml();
         fragment.setWebappJar(isWebapp);
         fragment.setDelegate(delegate);

Modified: tomcat/trunk/java/org/apache/tomcat/util/scan/StandardJarScanner.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/scan/StandardJarScanner.java?rev=1742093&r1=1742092&r2=1742093&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/scan/StandardJarScanner.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/scan/StandardJarScanner.java Tue May  3 11:02:55
2016
@@ -261,6 +261,11 @@ public class StandardJarScanner implemen
                             }
                             String webappPath = null;
                             if (urls[i].equals(webInfURL)) {
+                                if (scanType == JarScanType.PLUGGABILITY) {
+                                    // WEB-INF/classes should not be scanned for
+                                    // web fragments.
+                                    continue;
+                                }
                                 webappPath = Constants.WEB_INF_CLASSES;
                             }
                             try {



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


Mime
View raw message