Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 10951 invoked from network); 20 Mar 2007 08:53:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 Mar 2007 08:53:53 -0000 Received: (qmail 51883 invoked by uid 500); 20 Mar 2007 08:54:01 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 51864 invoked by uid 500); 20 Mar 2007 08:54:01 -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 51851 invoked by uid 99); 20 Mar 2007 08:54:01 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Mar 2007 01:54:01 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Mar 2007 01:53:52 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 680D7714082 for ; Tue, 20 Mar 2007 01:53:32 -0700 (PDT) Message-ID: <28844029.1174380812421.JavaMail.jira@brutus> Date: Tue, 20 Mar 2007 01:53:32 -0700 (PDT) From: "Leo Li (JIRA)" To: commits@harmony.apache.org Subject: [jira] Updated: (HARMONY-3436) [classlib][luni]java.net.JarURLConnection gets different jarFile when the inputstream has been closed if cache is not used. In-Reply-To: <8417033.1174371872368.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HARMONY-3436?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Leo Li updated HARMONY-3436: ---------------------------- Attachment: patch-3436.diff Will somebody try the patch? Thanks. Leo > [classlib][luni]java.net.JarURLConnection gets different jarFile when the inputstream has been closed if cache is not used. > --------------------------------------------------------------------------------------------------------------------------- > > Key: HARMONY-3436 > URL: https://issues.apache.org/jira/browse/HARMONY-3436 > Project: Harmony > Issue Type: Bug > Components: Classlib > Reporter: Leo Li > Attachments: patch-3436.diff > > > Here is an example: > public void test() throws Exception > { > URL url = new URL("jar:file:Test.jar!/test.class"); > JarURLConnection connection = (JarURLConnection) url.openConnection(); > connection.setUseCaches(false); > InputStream in = connection.getInputStream(); > JarFile jarFile1 = connection.getJarFile(); > byte[] data = new byte[1024]; > while(in.read(data)>=0); > in.close(); > JarFile jarFile2 = connection1.getJarFile(); > assertSame(jarFile1, jarFile2); > } > RI passes. > Harmony fails. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.