]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Better to remove on finally rather than the try block.
authorAdrian Cumiskey <acumiskey@apache.org>
Mon, 21 Jul 2008 13:00:45 +0000 (13:00 +0000)
committerAdrian Cumiskey <acumiskey@apache.org>
Mon, 21 Jul 2008 13:00:45 +0000 (13:00 +0000)
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

index c8129baf284bfa9fb46129d28a4f51e802df2e4c..891e85fa7af359c7059128cda6ce95ebc1fe17ad 100644 (file)
@@ -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");
         }
     }