Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2076322 | 5.0 | Kohsuke Kawaguchi | P3 | Closed | Fixed | b30 |
Name: erR10175 Date: 10/24/2003
The method javax.xml.datatype.Duration.equals(Object rhs) does not throw
NullPointerException if the rhs parameter is null.
The documentation of the method reads:
"A NullPointerException is thrown if the rhs parameter is null."
This bug affects new test in JCK 1.5 (not yet integrated)
api/javax_xml/datatype/Duration/index.html#DurationTests[Equals002]
To reproduce the bug compile and run the following code as shown
in the log below:
------------------------------ test.java
import javax.xml.datatype.Duration;
public class test {
public static void main(String [] args) {
Duration d = new Duration("P1Y");
System.out.println("d.equals(null) returns " + d.equals(null)
+ " instead of throwing NullPointerException");
}
}
----------------------------------------------------
------------------------------------------------ log
$javac test.java
$java -cp . -showversion test
java version "1.5.0-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta-b25)
Java HotSpot(TM) Server VM (build 1.5.0-beta-b25, mixed mode)
d.equals(null) returns false instead of throwing NullPointerException
----------------------------------------------------
======================================================================
The method javax.xml.datatype.Duration.equals(Object rhs) does not throw
NullPointerException if the rhs parameter is null.
The documentation of the method reads:
"A NullPointerException is thrown if the rhs parameter is null."
This bug affects new test in JCK 1.5 (not yet integrated)
api/javax_xml/datatype/Duration/index.html#DurationTests[Equals002]
To reproduce the bug compile and run the following code as shown
in the log below:
------------------------------ test.java
import javax.xml.datatype.Duration;
public class test {
public static void main(String [] args) {
Duration d = new Duration("P1Y");
System.out.println("d.equals(null) returns " + d.equals(null)
+ " instead of throwing NullPointerException");
}
}
----------------------------------------------------
------------------------------------------------ log
$javac test.java
$java -cp . -showversion test
java version "1.5.0-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta-b25)
Java HotSpot(TM) Server VM (build 1.5.0-beta-b25, mixed mode)
d.equals(null) returns false instead of throwing NullPointerException
----------------------------------------------------
======================================================================
- backported by
-
JDK-2076322 javax.xml.datatype.Duration("P1M").equals(null) does not throws NullPointerExcep
- Closed