harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Krivenko (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HARMONY-2361) [classlib] [luni] Method findResource() in class URLClassLoader doesn't throw NPE
Date Wed, 29 Nov 2006 14:49:23 GMT
     [ http://issues.apache.org/jira/browse/HARMONY-2361?page=all ]

Sergey Krivenko updated HARMONY-2361:
-------------------------------------

    Attachment: Harmony-2361-URLClassLoaderTest.patch

The attached is a patch to the test

> [classlib] [luni] Method findResource() in class URLClassLoader doesn't throw NPE
> ---------------------------------------------------------------------------------
>
>                 Key: HARMONY-2361
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2361
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: WIN XP
>            Reporter: Sergey Krivenko
>         Attachments: Harmony-2361-URLClassLoader.patch, Harmony-2361-URLClassLoaderTest.patch
>
>
> The following test should throw NPE as RI does:
> public class Test {
>     public static void main(String[] args) {
>         try {                                                                   
>             URLClassLoaderExt cl = new URLClassLoaderExt(new URL[296]); 
>             cl.findResource("0");    
>             System.out.println("FAILED");
>         } catch (NullPointerException npe) {                      
>             System.out.println("PASSED");
>         }
>     }
> }
> class URLClassLoaderExt extends URLClassLoader {
>     public URLClassLoaderExt(URL[] urls) {
>         super(urls);
>     }
>     
>     public URL findResource(String cl)  {
>         return super.findResource(cl);
>     }
> }

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

        

Mime
View raw message