Author: markt
Date: Wed Apr 16 17:37:07 2014
New Revision: 1587991
URL: http://svn.apache.org/r1587991
Log:
Partial fix for https://issues.apache.org/bugzilla/show_bug.cgi?id=56390
Fixes the locking of a JAR file when obtaining last modified time of a TLD
within the JAR
Modified:
tomcat/trunk/java/org/apache/jasper/compiler/TldCache.java
Modified: tomcat/trunk/java/org/apache/jasper/compiler/TldCache.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/TldCache.java?rev=1587991&r1=1587990&r2=1587991&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/compiler/TldCache.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/TldCache.java Wed Apr 16
17:37:07 2014
@@ -135,9 +135,10 @@ public class TldCache {
conn.getInputStream().close();
}
}
- Jar jar = tldResourcePath.getJar();
- if (jar != null) {
- result[1] =
jar.getLastModified(tldResourcePath.getEntryName());
+ try (Jar jar = tldResourcePath.getJar()) {
+ if (jar != null) {
+ result[1] =
jar.getLastModified(tldResourcePath.getEntryName());
+ }
}
} catch (IOException e) {
// Ignore (shouldn't happen)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]