ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [ant] helfper commented on a change in pull request #145: Override ZipOutputStream.write(int)
Date Sat, 13 Mar 2021 12:39:54 GMT

helfper commented on a change in pull request #145:
URL: https://github.com/apache/ant/pull/145#discussion_r593746440



##########
File path: src/tests/junit/org/apache/tools/zip/ZipOutputStreamTest.java
##########
@@ -70,4 +76,17 @@ public void testAdjustToLong() {
                      ZipUtil.adjustToLong(2 * Integer.MAX_VALUE));
     }
 
+    @Test
+    public void testWriteAndReadManifest() throws IOException {
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        ZipOutputStream zos = new ZipOutputStream(baos);
+        zos.putNextEntry(new ZipEntry(JarFile.MANIFEST_NAME));
+        new Manifest().write(zos);
+        zos.close();
+        ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
+        ZipInputStream zis = new ZipInputStream(bais);
+        zis.getNextEntry();
+        zis.closeEntry();
+        zis.close();
+    }

Review comment:
       Done now.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message