harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leo Li (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-3436) [classlib][luni]java.net.JarURLConnection gets different jarFile when the inputstream has been closed if cache is not used.
Date Tue, 20 Mar 2007 06:24:32 GMT
[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


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.


Mime
View raw message