Index: trunk/modules/archive/src/main/java/java/util/zip/ZipInputStream.java =================================================================== --- trunk/modules/archive/src/main/java/java/util/zip/ZipInputStream.java (revision 429584) +++ trunk/modules/archive/src/main/java/java/util/zip/ZipInputStream.java (working copy) @@ -77,9 +77,11 @@ * Closes this ZipInputStream. */ public void close() throws IOException { - closeEntry(); // Close the current entry - zipClosed = true; - super.close(); + if (zipClosed != true) { + closeEntry(); // Close the current entry + zipClosed = true; + super.close(); + } } /** Index: trunk/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/ZipInputStreamTest.java =================================================================== --- trunk/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/ZipInputStreamTest.java (revision 429584) +++ trunk/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/ZipInputStreamTest.java (working copy) @@ -65,6 +65,19 @@ } /** + * @tests java.util.zip.ZipInputStream#close() + */ + public void test_close2() { + // Test for method void java.util.zip.ZipInputStream.close() + try { + zis.close(); + zis.close(); + } catch (java.io.IOException e) { + fail("No exception expected: " + e); + } + } + + /** * @tests java.util.zip.ZipInputStream#closeEntry() */ public void test_closeEntry() {