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 07:24:32 UTC

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

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


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

Posted by "Leo Li (JIRA)" <ji...@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.


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

Posted by "Leo Li (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3436?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12482611 ] 

Leo Li commented on HARMONY-3436:
---------------------------------

Hi, Paulex:
Verified. 
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
>         Assigned To: Paulex Yang
>         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.


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

Posted by "Leo Li (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3436?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leo Li closed HARMONY-3436.
---------------------------


> [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
>         Assigned To: Paulex Yang
>         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.


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

Posted by "Paulex Yang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3436?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paulex Yang resolved HARMONY-3436.
----------------------------------

    Resolution: Fixed

Leo, patch applied at revision r520358, thanks a lot for this enhancement, please verify the issue is fully resolved.

> [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
>         Assigned To: Paulex Yang
>         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.


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

Posted by "Paulex Yang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3436?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paulex Yang reassigned HARMONY-3436:
------------------------------------

    Assignee: Paulex Yang

> [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
>         Assigned To: Paulex Yang
>         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.