Bug 44380 - TldConfig / Scan of URL that are not files
TldConfig / Scan of URL that are not files
Status: RESOLVED FIXED
Product: Tomcat 6
Classification: Unclassified
Component: Catalina
6.0.14
Other Linux
: P2 normal (vote)
: default
Assigned To: Tomcat Developers Mailing List
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2008-02-08 05:29 UTC by Florent BENOIT
Modified: 2008-04-15 10:28 UTC (History)
0 users



Attachments
Proposed patch to skip invalid URL for the algorithm (909 bytes, patch)
2008-02-08 05:30 UTC, Florent BENOIT
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.