Author: remy.maucherat(a)jboss.com
Date: 2009-08-31 11:10:14 -0400 (Mon, 31 Aug 2009)
New Revision: 1150
Modified:
trunk/java/org/apache/catalina/startup/ContextConfig.java
Log:
- Use the JAR repository when parsing TLDs (I don't see any reason not to), must be
something I did forget.
Modified: trunk/java/org/apache/catalina/startup/ContextConfig.java
===================================================================
--- trunk/java/org/apache/catalina/startup/ContextConfig.java 2009-08-31 09:34:38 UTC (rev
1149)
+++ trunk/java/org/apache/catalina/startup/ContextConfig.java 2009-08-31 15:10:14 UTC (rev
1150)
@@ -650,11 +650,11 @@
if (jarPath.equals("")) {
continue;
}
- JarFile jarFile = null;
- try {
- jarFile = new JarFile(jarPath);
- Iterator<String> jarTLDsIterator = TLDs.get(jarPath).iterator();
- while (jarTLDsIterator.hasNext()) {
+ JarRepository jarRepository = context.getJarRepository();
+ JarFile jarFile = jarRepository.findJar(jarPath);
+ Iterator<String> jarTLDsIterator = TLDs.get(jarPath).iterator();
+ while (jarTLDsIterator.hasNext()) {
+ try {
String tldPath = jarTLDsIterator.next();
stream = jarFile.getInputStream(jarFile.getEntry(tldPath));
synchronized (tldDigester) {
@@ -680,17 +680,17 @@
context.addJspTagLibrary(jarPath, tagLibraryInfo);
}
}
- }
- } catch (Exception e) {
- log.error(sm.getString("contextConfig.tldJarException",
- jarPath, context.getPath()), e);
- ok = false;
- } finally {
- if (jarFile != null) {
- try {
- jarFile.close();
- } catch (Throwable t) {
- // Ignore
+ } catch (Exception e) {
+ log.error(sm.getString("contextConfig.tldJarException",
+ jarPath, context.getPath()), e);
+ ok = false;
+ } finally {
+ if (stream != null) {
+ try {
+ stream.close();
+ } catch (Throwable t) {
+ // Ignore
+ }
}
}
}
Show replies by date