Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 24138 invoked from network); 25 Aug 2009 17:49:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 25 Aug 2009 17:49:58 -0000 Received: (qmail 18541 invoked by uid 500); 25 Aug 2009 17:50:24 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 18503 invoked by uid 500); 25 Aug 2009 17:50:23 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 18452 invoked by uid 99); 25 Aug 2009 17:50:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Aug 2009 17:50:23 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Aug 2009 17:50:20 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id ABC9F234C04C for ; Tue, 25 Aug 2009 10:49:59 -0700 (PDT) Message-ID: <487872326.1251222599689.JavaMail.jira@brutus> Date: Tue, 25 Aug 2009 10:49:59 -0700 (PDT) From: "Mark Hindess (JIRA)" To: commits@harmony.apache.org Subject: [jira] Updated: (HARMONY-6253) [classlib][archive] java.util.jar.JarInputStream.getNextJarEntry() should not throw ZipException In-Reply-To: <1076651033.1246282427372.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HARMONY-6253?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mark Hindess updated HARMONY-6253: ---------------------------------- Fix Version/s: (was: 5.0M11) This doesn't seem to be a regression or critical. Removing fix for 5.0M11 status. > [classlib][archive] java.util.jar.JarInputStream.getNextJarEntry() should not throw ZipException > ------------------------------------------------------------------------------------------------ > > Key: HARMONY-6253 > URL: https://issues.apache.org/jira/browse/HARMONY-6253 > Project: Harmony > Issue Type: Bug > Components: Classlib > Affects Versions: 5.0M10 > Reporter: Kevin Zhou > Attachments: ant.jar > > Original Estimate: 48h > Remaining Estimate: 48h > > Given a test case [1], RI passes it smoothly while HARMONY throws a java.util.zip.ZipException [2]. > [1] Test Case: > public void testJarInputStream() throws Exception { > JarInputStream jarInputStream = new JarInputStream(new FileInputStream("lib/ant.jar")); > JarOutputStream jarOutputStream = new JarOutputStream(new FileOutputStream("lib/ant.jar.gz")); > JarEntry jarEntry; > byte[] bytes = new byte[1024]; > InputStream inputStream = new BufferedInputStream(jarInputStream); > while ((jarEntry = jarInputStream.getNextJarEntry()) != null) { > jarOutputStream.putNextEntry(jarEntry); > int read = -1; > while ((read = inputStream.read(bytes)) != -1) { > jarOutputStream.write(bytes, 0, read); > } > jarOutputStream.closeEntry(); > } > jarOutputStream.close(); > } > [2] Stack Trace: > java.util.zip.ZipException: Size mismatch > at java.util.zip.ZipInputStream.closeEntry(ZipInputStream.java:138) > at java.util.zip.ZipInputStream.getNextEntry(ZipInputStream.java:156) > at java.util.jar.JarInputStream.getNextEntry(JarInputStream.java:160) > at java.util.jar.JarInputStream.getNextJarEntry(JarInputStream.java:111) > at Test.testJarInputStream(Test.java:22) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.