tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r647345 - /tomcat/trunk/java/org/apache/catalina/startup/TldConfig.java
Date Fri, 11 Apr 2008 23:07:14 GMT
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


Mime
View raw message