]> gitweb.fperrin.net Git - Dictionary.git/blobdiff - jars/icu4j-52_1/tools/build/src/com/ibm/icu/dev/tool/docs/GatherAPIData.java
Upgrade ICU4J.
[Dictionary.git] / jars / icu4j-52_1 / tools / build / src / com / ibm / icu / dev / tool / docs / GatherAPIData.java
similarity index 97%
rename from jars/icu4j-4_8_1_1/tools/build/src/com/ibm/icu/dev/tool/docs/GatherAPIData.java
rename to jars/icu4j-52_1/tools/build/src/com/ibm/icu/dev/tool/docs/GatherAPIData.java
index 8741aa4036e320fcc33683670a774db6f4094b3b..9f2f22cf2afb48768994b62a06ccb560a90162c3 100644 (file)
@@ -1,6 +1,6 @@
 /**
  *******************************************************************************
- * Copyright (C) 2004-2010, International Business Machines Corporation and    *
+ * Copyright (C) 2004-2012, International Business Machines Corporation and    *
  * others. All Rights Reserved.                                                *
  *******************************************************************************
  */
@@ -145,9 +145,10 @@ public class GatherAPIData {
 
         OutputStream os = System.out;
         if (output != null) {
+            ZipOutputStream zos = null;
             try {
                 if (zip) {
-                    ZipOutputStream zos = new ZipOutputStream(new FileOutputStream(output + ".zip"));
+                    zos = new ZipOutputStream(new FileOutputStream(output + ".zip"));
                     zos.putNextEntry(new ZipEntry(output));
                     os = zos;
                 } else if (gzip) {
@@ -161,6 +162,15 @@ public class GatherAPIData {
                 re.initCause(e);
                 throw re;
             }
+            finally {
+                if (zos != null) {
+                    try {
+                        zos.close();
+                    } catch (Exception e) {
+                        // ignore
+                    }
+                }
+            }
         }
 
         BufferedWriter bw = null;