Details
-
Bug
-
Resolution: Fixed
-
P2
-
8
-
b110
-
generic
-
generic
-
Verified
Description
Platform: all
JDK: 7, 8
The following method
http://download.oracle.com/javase/7/docs/api/java/awt/font/TransformAttribute.html#equals%28java.lang.Object%29
does not say anything regarding comparison with null argument value.
However implementation produces NPE.
Please see the following code sample:
import java.awt.font.TransformAttribute;
import java.awt.geom.AffineTransform;
public class TrAttrEqNull {
public static void main(String[] args) {
final TransformAttribute ta =
new TransformAttribute(new AffineTransform(1, 0, 1, 1, 0, 0));
ta.equals(null);
}
}
The output will be:
Exception in thread "main" java.lang.NullPointerException
at java.awt.font.TransformAttribute.equals(TransformAttribute.java:149)
JDK: 7, 8
The following method
http://download.oracle.com/javase/7/docs/api/java/awt/font/TransformAttribute.html#equals%28java.lang.Object%29
does not say anything regarding comparison with null argument value.
However implementation produces NPE.
Please see the following code sample:
import java.awt.font.TransformAttribute;
import java.awt.geom.AffineTransform;
public class TrAttrEqNull {
public static void main(String[] args) {
final TransformAttribute ta =
new TransformAttribute(new AffineTransform(1, 0, 1, 1, 0, 0));
ta.equals(null);
}
}
The output will be:
Exception in thread "main" java.lang.NullPointerException
at java.awt.font.TransformAttribute.equals(TransformAttribute.java:149)