-
Bug
-
Resolution: Fixed
-
P3
-
1.4.0
-
beta2
-
generic
-
generic
Name: ipR10067 Date: 06/03/2001
The description of method "contains" of class javax.imageio.spi.ServiceRegistry
says nothing about throwing NullPointerException,
but if argument "provider" is null it will be thrown.
To reproduce the problem run the following test:
---------------------------- source --------------------------------
import javax.imageio.spi.ServiceRegistry;
import javax.imageio.spi.IIORegistry;
public class Test {
public static void main(String argv[]) {
boolean result;
ServiceRegistry SR = IIORegistry.getDefaultInstance(); ;
try {
result = SR.contains(null);
System.out.println("Result = " + result + " (should be false)");
} catch (Throwable ex) {
System.out.println ("Unexpected exception " + ex.toString());
}
return;
}
}
---------------------------- log --------------------------------
>java -version
java version "1.4.0-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta-b65)
Java HotSpot(TM) Client VM (build 1.4.0-beta-b65, mixed mode)
>java Test
Unexpected exception java.lang.NullPointerException
======================================================================