You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Alexey Petrenko (JIRA)" <ji...@apache.org> on 2006/12/26 14:58:23 UTC
[jira] Resolved: (HARMONY-2871) [classlib][luni] URLClassLoader
invalidates it's state if there is invalid URLs in its urls list
[ http://issues.apache.org/jira/browse/HARMONY-2871?page=all ]
Alexey Petrenko resolved HARMONY-2871.
--------------------------------------
Resolution: Fixed
The patch has been applied.
Please verify.
> [classlib][luni] URLClassLoader invalidates it's state if there is invalid URLs in its urls list
> ------------------------------------------------------------------------------------------------
>
> Key: HARMONY-2871
> URL: http://issues.apache.org/jira/browse/HARMONY-2871
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Environment: WinXP
> Reporter: Mikhail Markov
> Assigned To: Alexey Petrenko
> Priority: Critical
> Attachments: URLClassLoader.patch, URLClassLoaderTest.patch
>
>
> The test below passed on RI, but fails on Harmony.
> Output on Harmony:
> FAILED: java.lang.NullPointerException
> Output on RI:
> PASSED.
> The cause is that URLClassLoader sets URL's in it's internal list which it could not open to null and throws NPE during the next attempt to load the class.
> -------------------- Test.java ------------------------
> import java.net.URL;
> import java.net.URLClassLoader;
> public class Test {
> public static void main(String [] args) throws Exception {
> URLClassLoader cl = new URLClassLoader(new URL[] { new URL("file:/c:/foo.jar") });
> try {
> Class.forName("foo.Foo", false, cl);
> } catch (Exception ex) {
> // Don't care
> }
> try {
> Class.forName("foo.Foo", false, cl);
> System.out.println("FAILED: no exceptions");
> } catch (ClassNotFoundException cnfe) {
> System.out.println("PASSED.");
> } catch (Exception ex) {
> System.out.println("FAILED: " + ex);
> }
> }
> }
--
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