Bug 44380

Summary: TldConfig / Scan of URL that are not files
Product: Tomcat 6 Reporter: Florent BENOIT <florent.benoit>
Component: CatalinaAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 6.0.14   
Target Milestone: default   
Hardware: Other   
OS: Linux   
Attachments: Proposed patch to skip invalid URL for the algorithm

Description Florent BENOIT 2008-02-08 05:29:21 UTC
The TldConfig class (org.apache.catalina.startup) is asking ClassLoader and all
parent ClassLoader in order to get the URLs and then assume that the URLs are
using "file" protocol.

But when Tomcat is embedded, sometimes the URL are not always using "file"
protocol and then new File() will fail.

The given patch is to skip the URLs that are not using file protocol (that
avoids ugly NPE in the "new File(urls[i].toURI());" call
Comment 1 Florent BENOIT 2008-02-08 05:30:12 UTC
Created attachment 21499 [details]
Proposed patch to skip invalid URL for the algorithm
Comment 2 Mark Thomas 2008-04-15 10:28:24 UTC
This has been fixed in trunk and 6.0.x. It will be in 6.0.17 onwards.

Many thanks for the patch.