Use File URLs where they can be determined for speed.
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@
1138497 13f79535-47bb-0310-9956-
ffa450edef68
}
URL url = null;
try {
- url = context.getResource(path);
+ // File URLs are always faster to work with so use them
+ // if available.
+ String realPath = context.getRealPath(path);
+ if (realPath == null) {
+ url = context.getResource(path);
+ } else {
+ url = (new File(realPath)).toURI().toURL();
+ }
process(callback, url);
} catch (IOException e) {
log.warn(sm.getString("jarScan.webinflibFail", url), e);
<bug>51403</bug>: Avoid NPE in JULI FileHandler if formatter is
misconfigured. (kkolinko)
</add>
+ <fix>
+ Previous improvements in JAR scanning performance introduced a start-up
+ performance penalty for some use cases. This fix addresses those
+ performance penalties while retaining the original improvements. (markt)
+ </fix>
</changelog>
</subsection>
<subsection name="Coyote">