You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Vladimir Strigun (JIRA)" <ji...@apache.org> on 2006/04/18 14:11:18 UTC

[jira] Updated: (HARMONY-29) java.util.zip.ZipException while onening jar file on local machine

     [ http://issues.apache.org/jira/browse/HARMONY-29?page=all ]

Vladimir Strigun updated HARMONY-29:
------------------------------------

    Attachment: Harmony-29_patch.txt

Mikhail,

sorry for my confusing comments in the issue. According to my last comment we should use false as a parameter for decode function. In case of true '+' character will be converted to space. Attached patch fix this problem.

Thank you!

> java.util.zip.ZipException while onening jar file on local machine
> ------------------------------------------------------------------
>
>          Key: HARMONY-29
>          URL: http://issues.apache.org/jira/browse/HARMONY-29
>      Project: Harmony
>         Type: Bug

>   Components: Classlib
>     Reporter: Vladimir Strigun
>     Assignee: Mikhail Loenko
>  Attachments: Harmony-29_patch.txt
>
> When I try to get entries from jar file I get java.util.zip.ZipException. Here is testcase for reproducing the issue:
> import java.net.JarURLConnection;
> import java.net.URL;
> import java.util.Enumeration;
> public class TestZipFile {
>     public static void main(String argv[]) throws Throwable {
>         final String urlStr = "jar:file:/C:/Documents%20and%20Settings/" +
>                 "user/test.jar!/Test.class";
>         JarURLConnection conn = (JarURLConnection)
>                 new URL(urlStr).openConnection();
>         Enumeration enum = conn.getJarFile().entries();
>         System.out.println("PASS");
>     }
> }
> On RI test passed, but with Harmony classlibs I get following exception:
> java.util.zip.ZipException: Unable to open: C:\Documents%20and%20Settings\user\test.jar
>         at java.util.zip.ZipFile.openZip()
>         at java.util.zip.ZipFile.<init>()
>         at java.util.jar.JarFile.<init>()
>         at com.ibm.oti.net.www.protocol.jar.JarURLConnection.openJarFile()
>         at com.ibm.oti.net.www.protocol.jar.JarURLConnection.findJarFile()
>         at com.ibm.oti.net.www.protocol.jar.JarURLConnection.connect()
>         at com.ibm.oti.net.www.protocol.jar.JarURLConnection.getJarFile()
>         at TestZipFile.main(TestZipFile.java:9)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira