You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2014/04/16 19:37:08 UTC
svn commit: r1587991 -
/tomcat/trunk/java/org/apache/jasper/compiler/TldCache.java
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: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org