You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Li Jing Qin (JIRA)" <ji...@apache.org> on 2008/12/23 06:27:44 UTC
[jira] Created: (HARMONY-6059) [classlib][luni] jar URL is created
with wrong protocol for URLStreamHandler
[classlib][luni] jar URL is created with wrong protocol for URLStreamHandler
----------------------------------------------------------------------------
Key: HARMONY-6059
URL: https://issues.apache.org/jira/browse/HARMONY-6059
Project: Harmony
Issue Type: Bug
Environment: vm which is above java6 is required
Reporter: Li Jing Qin
Priority: Minor
>From the spec: "Any URL that ends with a '/' is assumed to refer to a directory. Otherwise, the URL is assumed to refer to a JAR file which will be downloaded and opened as needed".
So what I have done follows:
1. specified the URLStreamHandler to the jar, not the protocol as before
2. Add the test case to the test-impl
3. Because the I have add the a class file to the lf.jar, the size of jar file is increased. So the test size case int the JarURLConnectionTest fail. I have changed the test case.
4. The reason that the vm above java6 is required is because the class file I have added to the lf.jar is compiled under the java 6.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-6059) [classlib][luni] jar URL is created
with wrong protocol for URLStreamHandler
Posted by "Li Jing Qin (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6059?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Li Jing Qin updated HARMONY-6059:
---------------------------------
Attachment: HARMONY-6059.diff
> [classlib][luni] jar URL is created with wrong protocol for URLStreamHandler
> ----------------------------------------------------------------------------
>
> Key: HARMONY-6059
> URL: https://issues.apache.org/jira/browse/HARMONY-6059
> Project: Harmony
> Issue Type: Bug
> Environment: vm which is above java6 is required
> Reporter: Li Jing Qin
> Priority: Minor
> Attachments: HARMONY-6059.diff, lf.jar
>
>
> From the spec: "Any URL that ends with a '/' is assumed to refer to a directory. Otherwise, the URL is assumed to refer to a JAR file which will be downloaded and opened as needed".
> So what I have done follows:
> 1. specified the URLStreamHandler to the jar, not the protocol as before
> 2. Add the test case to the test-impl
> 3. Because the I have add the a class file to the lf.jar, the size of jar file is increased. So the test size case int the JarURLConnectionTest fail. I have changed the test case.
> 4. The reason that the vm above java6 is required is because the class file I have added to the lf.jar is compiled under the java 6.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-6059) [classlib][luni] jar URL is
created with wrong protocol for URLStreamHandler
Posted by "Li Jing Qin (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6059?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12665052#action_12665052 ]
Li Jing Qin commented on HARMONY-6059:
--------------------------------------
Thanks Nathan. The test case looks fine.
> [classlib][luni] jar URL is created with wrong protocol for URLStreamHandler
> ----------------------------------------------------------------------------
>
> Key: HARMONY-6059
> URL: https://issues.apache.org/jira/browse/HARMONY-6059
> Project: Harmony
> Issue Type: Bug
> Reporter: Li Jing Qin
> Assignee: Nathan Beyer
> Priority: Minor
> Fix For: 5.0M9
>
> Attachments: HARMONY-6059.diff, HARMONY-6059v2.diff, lf.jar
>
>
> From the spec: "Any URL that ends with a '/' is assumed to refer to a directory. Otherwise, the URL is assumed to refer to a JAR file which will be downloaded and opened as needed".
> So what I have done follows:
> 1. specified the URLStreamHandler to the jar, not the protocol as before
> 2. Add the test case to the test-impl
> 3. Because the I have add the a class file to the lf.jar, the size of jar file is increased. So the test size case int the JarURLConnectionTest fail. I have changed the test case.
> 4. The reason that the vm above java6 is required is because the class file I have added to the lf.jar is compiled under the java 6.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (HARMONY-6059) [classlib][luni] jar URL is created
with wrong protocol for URLStreamHandler
Posted by "Nathan Beyer (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6059?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Nathan Beyer resolved HARMONY-6059.
-----------------------------------
Resolution: Fixed
I've commited my changes at r735873.
I refined it a bit further so as to eliminate the package name massaging.
> [classlib][luni] jar URL is created with wrong protocol for URLStreamHandler
> ----------------------------------------------------------------------------
>
> Key: HARMONY-6059
> URL: https://issues.apache.org/jira/browse/HARMONY-6059
> Project: Harmony
> Issue Type: Bug
> Reporter: Li Jing Qin
> Assignee: Nathan Beyer
> Priority: Minor
> Fix For: 5.0M9
>
> Attachments: HARMONY-6059.diff, HARMONY-6059v2.diff, lf.jar
>
>
> From the spec: "Any URL that ends with a '/' is assumed to refer to a directory. Otherwise, the URL is assumed to refer to a JAR file which will be downloaded and opened as needed".
> So what I have done follows:
> 1. specified the URLStreamHandler to the jar, not the protocol as before
> 2. Add the test case to the test-impl
> 3. Because the I have add the a class file to the lf.jar, the size of jar file is increased. So the test size case int the JarURLConnectionTest fail. I have changed the test case.
> 4. The reason that the vm above java6 is required is because the class file I have added to the lf.jar is compiled under the java 6.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-6059) [classlib][luni] jar URL is created
with wrong protocol for URLStreamHandler
Posted by "Li Jing Qin (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6059?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Li Jing Qin updated HARMONY-6059:
---------------------------------
Attachment: lf.jar
> [classlib][luni] jar URL is created with wrong protocol for URLStreamHandler
> ----------------------------------------------------------------------------
>
> Key: HARMONY-6059
> URL: https://issues.apache.org/jira/browse/HARMONY-6059
> Project: Harmony
> Issue Type: Bug
> Environment: vm which is above java6 is required
> Reporter: Li Jing Qin
> Priority: Minor
> Attachments: HARMONY-6059.diff, lf.jar
>
>
> From the spec: "Any URL that ends with a '/' is assumed to refer to a directory. Otherwise, the URL is assumed to refer to a JAR file which will be downloaded and opened as needed".
> So what I have done follows:
> 1. specified the URLStreamHandler to the jar, not the protocol as before
> 2. Add the test case to the test-impl
> 3. Because the I have add the a class file to the lf.jar, the size of jar file is increased. So the test size case int the JarURLConnectionTest fail. I have changed the test case.
> 4. The reason that the vm above java6 is required is because the class file I have added to the lf.jar is compiled under the java 6.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (HARMONY-6059) [classlib][luni] jar URL is created
with wrong protocol for URLStreamHandler
Posted by "Nathan Beyer (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6059?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Nathan Beyer closed HARMONY-6059.
---------------------------------
> [classlib][luni] jar URL is created with wrong protocol for URLStreamHandler
> ----------------------------------------------------------------------------
>
> Key: HARMONY-6059
> URL: https://issues.apache.org/jira/browse/HARMONY-6059
> Project: Harmony
> Issue Type: Bug
> Reporter: Li Jing Qin
> Assignee: Nathan Beyer
> Priority: Minor
> Fix For: 5.0M9
>
> Attachments: HARMONY-6059.diff, HARMONY-6059v2.diff, lf.jar
>
>
> From the spec: "Any URL that ends with a '/' is assumed to refer to a directory. Otherwise, the URL is assumed to refer to a JAR file which will be downloaded and opened as needed".
> So what I have done follows:
> 1. specified the URLStreamHandler to the jar, not the protocol as before
> 2. Add the test case to the test-impl
> 3. Because the I have add the a class file to the lf.jar, the size of jar file is increased. So the test size case int the JarURLConnectionTest fail. I have changed the test case.
> 4. The reason that the vm above java6 is required is because the class file I have added to the lf.jar is compiled under the java 6.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-6059) [classlib][luni] jar URL is
created with wrong protocol for URLStreamHandler
Posted by "Jimmy, Jing Lv (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6059?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12661488#action_12661488 ]
Jimmy, Jing Lv commented on HARMONY-6059:
-----------------------------------------
As this is the trunk of Harmony 5, please use java 5 version classes.
> [classlib][luni] jar URL is created with wrong protocol for URLStreamHandler
> ----------------------------------------------------------------------------
>
> Key: HARMONY-6059
> URL: https://issues.apache.org/jira/browse/HARMONY-6059
> Project: Harmony
> Issue Type: Bug
> Environment: vm which is above java6 is required
> Reporter: Li Jing Qin
> Priority: Minor
> Attachments: HARMONY-6059.diff, lf.jar
>
>
> From the spec: "Any URL that ends with a '/' is assumed to refer to a directory. Otherwise, the URL is assumed to refer to a JAR file which will be downloaded and opened as needed".
> So what I have done follows:
> 1. specified the URLStreamHandler to the jar, not the protocol as before
> 2. Add the test case to the test-impl
> 3. Because the I have add the a class file to the lf.jar, the size of jar file is increased. So the test size case int the JarURLConnectionTest fail. I have changed the test case.
> 4. The reason that the vm above java6 is required is because the class file I have added to the lf.jar is compiled under the java 6.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-6059) [classlib][luni] jar URL is
created with wrong protocol for URLStreamHandler
Posted by "Nathan Beyer (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6059?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12664938#action_12664938 ]
Nathan Beyer commented on HARMONY-6059:
---------------------------------------
I've reworked the test a little bit and I think it's more reliable and clean. Here's what the new test method would look like. It works on Windows and I'll test it on Linux a bit later. Let me know what you guys think.
public void test_Constructor$Ljava_net_URLLjava_lang_ClassLoaderLjava_net_URLStreamHandlerFactory() throws Exception {
class TestFactory implements URLStreamHandlerFactory {
public URLStreamHandler createURLStreamHandler(String protocol) {
if ("jar".equals(protocol)) {
return new Handler();
}
fail("Should be jar Handler. But " + protocol);
return null;
}
}
final String base = getClass().getClassLoader().getResource(
"../" + getClass().getPackage().getName().replace('.', '/')).toExternalForm();
final URL[] urls = { new URL(base + "/lf.jar") };
final URLClassLoader ucl = new URLClassLoader(urls, null, new TestFactory());
final URL res = ucl.findResource("swt.dll");
assertNotNull(res);
final URI e = new URI("jar:" + base + "/lf.jar!/swt.dll");
final URI a = res.toURI();
assertEquals(e, a);
}
> [classlib][luni] jar URL is created with wrong protocol for URLStreamHandler
> ----------------------------------------------------------------------------
>
> Key: HARMONY-6059
> URL: https://issues.apache.org/jira/browse/HARMONY-6059
> Project: Harmony
> Issue Type: Bug
> Environment: vm which is above java6 is required
> Reporter: Li Jing Qin
> Priority: Minor
> Fix For: 5.0M9
>
> Attachments: HARMONY-6059.diff, HARMONY-6059v2.diff, lf.jar
>
>
> From the spec: "Any URL that ends with a '/' is assumed to refer to a directory. Otherwise, the URL is assumed to refer to a JAR file which will be downloaded and opened as needed".
> So what I have done follows:
> 1. specified the URLStreamHandler to the jar, not the protocol as before
> 2. Add the test case to the test-impl
> 3. Because the I have add the a class file to the lf.jar, the size of jar file is increased. So the test size case int the JarURLConnectionTest fail. I have changed the test case.
> 4. The reason that the vm above java6 is required is because the class file I have added to the lf.jar is compiled under the java 6.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-6059) [classlib][luni] jar URL is
created with wrong protocol for URLStreamHandler
Posted by "Nathan Beyer (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6059?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12664933#action_12664933 ]
Nathan Beyer commented on HARMONY-6059:
---------------------------------------
Did anyone try the new test that was added with this patch on a Windows OS?
I'm getting a failure from the following line -
assertEquals("Failed", BASE.toString()+SEP+"lf.jar!"+SEP+"swt.dll", res.getFile());
The error message is as follows -
Failed expected:<...5Ctests%5Cjava%5Cnet[\lf.jar!\]swt.dll> but was:<...5Ctests%5Cjava%5Cnet[/lf.jar!/]swt.dll>
The field 'res' is a java.net.URL, so wouldn't the path separator's be normalized to '/', instead of the OS-specific separator?
> [classlib][luni] jar URL is created with wrong protocol for URLStreamHandler
> ----------------------------------------------------------------------------
>
> Key: HARMONY-6059
> URL: https://issues.apache.org/jira/browse/HARMONY-6059
> Project: Harmony
> Issue Type: Bug
> Environment: vm which is above java6 is required
> Reporter: Li Jing Qin
> Priority: Minor
> Fix For: 5.0M9
>
> Attachments: HARMONY-6059.diff, HARMONY-6059v2.diff, lf.jar
>
>
> From the spec: "Any URL that ends with a '/' is assumed to refer to a directory. Otherwise, the URL is assumed to refer to a JAR file which will be downloaded and opened as needed".
> So what I have done follows:
> 1. specified the URLStreamHandler to the jar, not the protocol as before
> 2. Add the test case to the test-impl
> 3. Because the I have add the a class file to the lf.jar, the size of jar file is increased. So the test size case int the JarURLConnectionTest fail. I have changed the test case.
> 4. The reason that the vm above java6 is required is because the class file I have added to the lf.jar is compiled under the java 6.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Reopened: (HARMONY-6059) [classlib][luni] jar URL is created
with wrong protocol for URLStreamHandler
Posted by "Nathan Beyer (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6059?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Nathan Beyer reopened HARMONY-6059:
-----------------------------------
Assignee: Nathan Beyer
> [classlib][luni] jar URL is created with wrong protocol for URLStreamHandler
> ----------------------------------------------------------------------------
>
> Key: HARMONY-6059
> URL: https://issues.apache.org/jira/browse/HARMONY-6059
> Project: Harmony
> Issue Type: Bug
> Reporter: Li Jing Qin
> Assignee: Nathan Beyer
> Priority: Minor
> Fix For: 5.0M9
>
> Attachments: HARMONY-6059.diff, HARMONY-6059v2.diff, lf.jar
>
>
> From the spec: "Any URL that ends with a '/' is assumed to refer to a directory. Otherwise, the URL is assumed to refer to a JAR file which will be downloaded and opened as needed".
> So what I have done follows:
> 1. specified the URLStreamHandler to the jar, not the protocol as before
> 2. Add the test case to the test-impl
> 3. Because the I have add the a class file to the lf.jar, the size of jar file is increased. So the test size case int the JarURLConnectionTest fail. I have changed the test case.
> 4. The reason that the vm above java6 is required is because the class file I have added to the lf.jar is compiled under the java 6.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (HARMONY-6059) [classlib][luni] jar URL is created
with wrong protocol for URLStreamHandler
Posted by "Jimmy, Jing Lv (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6059?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jimmy, Jing Lv resolved HARMONY-6059.
-------------------------------------
Resolution: Fixed
Fix Version/s: 5.0M9
Looks fine. I've commited at r732281, please verify.
> [classlib][luni] jar URL is created with wrong protocol for URLStreamHandler
> ----------------------------------------------------------------------------
>
> Key: HARMONY-6059
> URL: https://issues.apache.org/jira/browse/HARMONY-6059
> Project: Harmony
> Issue Type: Bug
> Environment: vm which is above java6 is required
> Reporter: Li Jing Qin
> Priority: Minor
> Fix For: 5.0M9
>
> Attachments: HARMONY-6059.diff, HARMONY-6059v2.diff, lf.jar
>
>
> From the spec: "Any URL that ends with a '/' is assumed to refer to a directory. Otherwise, the URL is assumed to refer to a JAR file which will be downloaded and opened as needed".
> So what I have done follows:
> 1. specified the URLStreamHandler to the jar, not the protocol as before
> 2. Add the test case to the test-impl
> 3. Because the I have add the a class file to the lf.jar, the size of jar file is increased. So the test size case int the JarURLConnectionTest fail. I have changed the test case.
> 4. The reason that the vm above java6 is required is because the class file I have added to the lf.jar is compiled under the java 6.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-6059) [classlib][luni] jar URL is created
with wrong protocol for URLStreamHandler
Posted by "Nathan Beyer (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6059?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Nathan Beyer updated HARMONY-6059:
----------------------------------
Environment: (was: vm which is above java6 is required)
> [classlib][luni] jar URL is created with wrong protocol for URLStreamHandler
> ----------------------------------------------------------------------------
>
> Key: HARMONY-6059
> URL: https://issues.apache.org/jira/browse/HARMONY-6059
> Project: Harmony
> Issue Type: Bug
> Reporter: Li Jing Qin
> Priority: Minor
> Fix For: 5.0M9
>
> Attachments: HARMONY-6059.diff, HARMONY-6059v2.diff, lf.jar
>
>
> From the spec: "Any URL that ends with a '/' is assumed to refer to a directory. Otherwise, the URL is assumed to refer to a JAR file which will be downloaded and opened as needed".
> So what I have done follows:
> 1. specified the URLStreamHandler to the jar, not the protocol as before
> 2. Add the test case to the test-impl
> 3. Because the I have add the a class file to the lf.jar, the size of jar file is increased. So the test size case int the JarURLConnectionTest fail. I have changed the test case.
> 4. The reason that the vm above java6 is required is because the class file I have added to the lf.jar is compiled under the java 6.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-6059) [classlib][luni] jar URL is created
with wrong protocol for URLStreamHandler
Posted by "Li Jing Qin (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6059?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Li Jing Qin updated HARMONY-6059:
---------------------------------
Attachment: HARMONY-6059v2.diff
Thanks jimmy. Here is the new diff. Remove some uneccessary things.
> [classlib][luni] jar URL is created with wrong protocol for URLStreamHandler
> ----------------------------------------------------------------------------
>
> Key: HARMONY-6059
> URL: https://issues.apache.org/jira/browse/HARMONY-6059
> Project: Harmony
> Issue Type: Bug
> Environment: vm which is above java6 is required
> Reporter: Li Jing Qin
> Priority: Minor
> Attachments: HARMONY-6059.diff, HARMONY-6059v2.diff, lf.jar
>
>
> From the spec: "Any URL that ends with a '/' is assumed to refer to a directory. Otherwise, the URL is assumed to refer to a JAR file which will be downloaded and opened as needed".
> So what I have done follows:
> 1. specified the URLStreamHandler to the jar, not the protocol as before
> 2. Add the test case to the test-impl
> 3. Because the I have add the a class file to the lf.jar, the size of jar file is increased. So the test size case int the JarURLConnectionTest fail. I have changed the test case.
> 4. The reason that the vm above java6 is required is because the class file I have added to the lf.jar is compiled under the java 6.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.