-
Bug
-
Resolution: Fixed
-
P3
-
1.2.1, 5.0
Name: lm153972 Date: 08/16/2004
public boolean containsKey(java.lang.Object key) doesn't throw
NullPointerException when key is null as described in
specification for AGUI and J2SE 1.5
"Throws:
NullPointerException - key is null"
------------------------- ContainsKey.java --------------------
import java.awt.*;
import java.util.*;
public class ContainsKey{
public static void main(String argv[]) {
try {
RenderingHints rH = new RenderingHints(
RenderingHints.KEY_ALPHA_INTERPOLATION,
RenderingHints.VALUE_ALPHA_INTERPOLATION_SPEED);
if (!rH.containsKey(null)) {
System.out.println("NullPointerException expected");
}
} catch (Exception e) {
System.out.println("Exception during test:" + e.toString());
}
}
}
----------------------------------------------------------------
======================================================================
public boolean containsKey(java.lang.Object key) doesn't throw
NullPointerException when key is null as described in
specification for AGUI and J2SE 1.5
"Throws:
NullPointerException - key is null"
------------------------- ContainsKey.java --------------------
import java.awt.*;
import java.util.*;
public class ContainsKey{
public static void main(String argv[]) {
try {
RenderingHints rH = new RenderingHints(
RenderingHints.KEY_ALPHA_INTERPOLATION,
RenderingHints.VALUE_ALPHA_INTERPOLATION_SPEED);
if (!rH.containsKey(null)) {
System.out.println("NullPointerException expected");
}
} catch (Exception e) {
System.out.println("Exception during test:" + e.toString());
}
}
}
----------------------------------------------------------------
======================================================================