harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jessewil...@apache.org
Subject svn commit: r883478 - in /harmony/enhanced/classlib/trunk: modules/archive/make/exclude.common modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/jar/JarFileTest.java support/src/test/java/tests/resources/hyts_flushed.jar
Date Mon, 23 Nov 2009 20:03:15 GMT
Author: jessewilson
Date: Mon Nov 23 20:03:06 2009
New Revision: 883478

URL: http://svn.apache.org/viewvc?rev=883478&view=rev
Log:
Adding a test case that demonstrates a bug in JAR file decoding.

The specific problem discovered indirectly by the Pack200 test, which ran into problems with
jar files created using the now-rolled back flush() support in DeflaterOutputStream. The RI
passes this test.

The test is suppressed in exclude.common.

Added:
    harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/hyts_flushed.jar
  (with props)
Modified:
    harmony/enhanced/classlib/trunk/modules/archive/make/exclude.common
    harmony/enhanced/classlib/trunk/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/jar/JarFileTest.java

Modified: harmony/enhanced/classlib/trunk/modules/archive/make/exclude.common
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/archive/make/exclude.common?rev=883478&r1=883477&r2=883478&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/archive/make/exclude.common (original)
+++ harmony/enhanced/classlib/trunk/modules/archive/make/exclude.common Mon Nov 23 20:03:06
2009
@@ -0,0 +1 @@
+org/apache/harmony/archive/tests/java/util/jar/JarFileTest.java
\ No newline at end of file

Modified: harmony/enhanced/classlib/trunk/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/jar/JarFileTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/jar/JarFileTest.java?rev=883478&r1=883477&r2=883478&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/jar/JarFileTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/jar/JarFileTest.java
Mon Nov 23 20:03:06 2009
@@ -661,4 +661,12 @@
         res = jarFile.getInputStream(zipEntry).read();
         assertEquals("Wrong length of empty jar entry", -1, res);
     }
+
+    public void testJarWrittenWithFlush() throws IOException {
+        File f = new File(resources, "hyts_flushed.jar");
+        Support_Resources.copyFile(resources, null, "hyts_flushed.jar");
+
+        // Harmony crashes with ZipException: Central Directory Entry not found
+        new JarFile(f);
+    }
 }

Added: harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/hyts_flushed.jar
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/hyts_flushed.jar?rev=883478&view=auto
==============================================================================
Binary file - no diff available.

Propchange: harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/hyts_flushed.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream



Mime
View raw message