From 08974a4b8d2233a71312b7fb8b006de226e225ee Mon Sep 17 00:00:00 2001 From: Adrian Cumiskey Date: Mon, 21 Jul 2008 13:00:45 +0000 Subject: [PATCH] Better to remove on finally rather than the try block. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources@678406 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/fop/render/afp/DataObjectCache.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/java/org/apache/fop/render/afp/DataObjectCache.java b/src/java/org/apache/fop/render/afp/DataObjectCache.java index c8129baf2..891e85fa7 100644 --- a/src/java/org/apache/fop/render/afp/DataObjectCache.java +++ b/src/java/org/apache/fop/render/afp/DataObjectCache.java @@ -112,11 +112,12 @@ public final class DataObjectCache { try { raFile.close(); tempFile.delete(); + } catch (IOException e) { + log.error("Failed to close temporary file"); + } finally { synchronized (cacheMap) { cacheMap.remove(id); // remove ourselves from the cache map } - } catch (IOException e) { - log.error("Failed to close temporary file"); } } -- 2.39.5