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 2008/04/12 01:07:14 UTC

svn commit: r647345 - /tomcat/trunk/java/org/apache/catalina/startup/TldConfig.java

Author: markt
Date: Fri Apr 11 16:07:10 2008
New Revision: 647345

URL: http://svn.apache.org/viewvc?rev=647345&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=44380
Don't bother scanning non-file URLs for TLDs.
Patch provided by Florent BENOIT

Modified:
    tomcat/trunk/java/org/apache/catalina/startup/TldConfig.java

Modified: tomcat/trunk/java/org/apache/catalina/startup/TldConfig.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/TldConfig.java?rev=647345&r1=647344&r2=647345&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/startup/TldConfig.java (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/TldConfig.java Fri Apr 11 16:07:10 2008
@@ -679,11 +679,17 @@
             if (loader instanceof URLClassLoader) {
                 URL[] urls = ((URLClassLoader) loader).getURLs();
                 for (int i=0; i<urls.length; i++) {
-                    // Expect file URLs, these are %xx encoded or not depending on
-                    // the class loader
+                    // Expect file URLs, these are %xx encoded or not depending
+                    // on the class loader
                     // This is definitely not as clean as using JAR URLs either
                     // over file or the custom jndi handler, but a lot less
                     // buggy overall
+                    
+                    // Check that the URL is using file protocol, else ignore it
+                    if (!"file".equals(urls[i].getProtocol())) {
+                        continue;
+                    }
+                    
                     File file = null;
                     try {
                         file = new File(urls[i].toURI());



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