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
Assigned to: Geir Magnusson Jr
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