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 01:46:53 UTC

svn commit: r1754805 - /tomcat/tc7.0.x/trunk/java/org/apache/naming/resources/BaseDirContext.java

Author: markt
Date: Tue Aug  2 01:46:52 2016
New Revision: 1754805

URL: http://svn.apache.org/viewvc?rev=1754805&view=rev
Log:
Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=59866
Partial fix for issue 2. This only applies to 7.0.x.
Don't waste cycles trying to load classes from alternate locations since they can only contain static resources.

Modified:
    tomcat/tc7.0.x/trunk/java/org/apache/naming/resources/BaseDirContext.java

Modified: tomcat/tc7.0.x/trunk/java/org/apache/naming/resources/BaseDirContext.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/naming/resources/BaseDirContext.java?rev=1754805&r1=1754804&r2=1754805&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/naming/resources/BaseDirContext.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/naming/resources/BaseDirContext.java Tue Aug  2 01:46:52 2016
@@ -497,7 +497,13 @@ public abstract class BaseDirContext imp
             return obj;
         }
 
-        // Check the alternate locations
+        // Class files may not be loaded from the alternate locations so don't
+        // waste cycles looking.
+        if (name.endsWith(".class")) {
+            return null;
+        }
+        
+        // Check the alternate locations (Resource JARs)
         String resourceName = "/META-INF/resources" + name;
         for (DirContext altDirContext : altDirContexts) {
             if (altDirContext instanceof BaseDirContext) {



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