Details
Description
By removing the reference to java.io.Closeable in org.springmodules.cache.impl.Element and adding
two close methods for both InputStream and OutputStream allows the caching to be used with at least
jdk 1.4. See below:
private void close(OutputStream outputStream) {
if (outputStream == null)
try { outputStream.close(); } catch (Exception exception) { String clazz = outputStream.getClass().getName(); logger.error("Unable to close " + clazz, exception); }
}
private void close(InputStream inputStream) {
if (inputStream == null) { return; }
try
{ inputStream.close(); }catch (Exception exception)
{ String clazz = inputStream.getClass().getName(); logger.error("Unable to close " + clazz, exception); }}
REPLACES:
private void close(Closeable closeable) {
if (closeable == null)
try
{ closeable.close(); }catch (Exception exception)
{ String clazz = closeable.getClass().getName(); logger.error("Unable to close " + clazz, exception); }}