401485 zip file closed exception

This commit is contained in:
Jan Bartel 2013-02-22 18:25:40 +11:00
parent 95f166b374
commit 4cb0a964ef
1 changed files with 13 additions and 9 deletions

View File

@ -65,19 +65,23 @@ class JarFileResource extends JarResource
_list=null;
_entry=null;
_file=null;
if ( _jarFile != null )
//if the jvm is not doing url caching, then the JarFiles will not be cached either,
//and so they are safe to close
if (!getUseCaches())
{
try
if ( _jarFile != null )
{
_jarFile.close();
}
catch ( IOException ioe )
{
LOG.ignore(ioe);
try
{
LOG.debug("Closing JarFile "+_jarFile.getName());
_jarFile.close();
}
catch ( IOException ioe )
{
LOG.ignore(ioe);
}
}
}
_jarFile=null;
super.release();
}