You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2016/08/02 15:12:23 UTC

svn commit: r1754944 - in /tomcat/trunk: java/org/apache/catalina/startup/ContextConfig.java webapps/docs/changelog.xml

Author: markt
Date: Tue Aug  2 15:12:23 2016
New Revision: 1754944

URL: http://svn.apache.org/viewvc?rev=1754944&view=rev
Log:
Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=59866
Don't scan WEB-INF/classes/META-INF/resources unnecessarily.
Note only the first issue in the bug report applies to 9.0.x.

Modified:
    tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java
    tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java?rev=1754944&r1=1754943&r2=1754944&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java Tue Aug  2 15:12:23 2016
@@ -1141,6 +1141,11 @@ public class ContextConfig implements Li
                         context.getResources().listResources("/WEB-INF/classes");
 
                 for (WebResource webResource : webResources) {
+                    // Skip the META-INF directory from any JARs that have been
+                    // expanded in to WEB-INF/classes (sometimes IDEs do this).
+                    if ("META-INF".equals(webResource.getName())) {
+                        continue;
+                    }
                     processAnnotationsWebResource(webResource, webXml,
                             webXml.isMetadataComplete(), javaClassCache);
                 }

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1754944&r1=1754943&r2=1754944&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Tue Aug  2 15:12:23 2016
@@ -92,6 +92,12 @@
         <bug>59824</bug>: Mark the <code>RewriteValve</code> as supporting async
         processing by default. (markt)
       </fix>
+      <fix>
+        <bug>59866</bug>: When scanning <code>WEB-INF/classes</code> for
+        annotations, don't scan the contents of
+        <code>WEB-INF/classes/META-INF</code> (if present) since classes will
+        never be loaded from that location. (markt)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Coyote">



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