[Kaffe] another classloader bug.

Godmar Back gback at cs.utah.edu
Thu Feb 4 20:34:06 PST 1999


 While you have discovered a bug in Kaffe, assuming that
Class.forName("[int") throws an IllegalArgumentException is specific
to JDK 1.1.  JDK 1.2 throws a ClassNotFoundException, and that's what
we'll do.

	- Godmar

> 
> Hello.
> 
> It looks like the classloader in kaffe does not return the
> same thing as the JDK for this test case. This first one
> works just fine but the second one crashes.
> 
> 
> public class LoadBug {
>     public static void main(String[] argv) throws Exception {
> 	try {
> 	    Class.forName("[[[LInteger;");
> 	} catch (ClassNotFoundException e) {
> 	    System.out.println("caught 1");
> 	}
> 
> 	try {
> 	    Class.forName("[int");
> 	} catch (IllegalArgumentException e) {
> 	    System.out.println("caught 2");
> 	}
>     }
> }
> 
> JDK
> 
> caught 1
> caught 2
> 
> 
> 
> Kaffe
> 
> % kaffe LoadBug
> caught 1
> java.lang.NullPointerException
>         at LoadBug.main(LoadBug.java:10)
> 
> 
> 
> I hope that helps
> mo dejong
> dejong at cs.umn.edu
> 
> 



More information about the kaffe mailing list