You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Leo Li (JIRA)" <ji...@apache.org> on 2007/03/20 09:53:32 UTC

[jira] Updated: (HARMONY-3436) [classlib][luni]java.net.JarURLConnection gets different jarFile when the inputstream has been closed if cache is not used.

     [ 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.