-
Bug
-
Resolution: Fixed
-
P4
-
5.0
-
b03
-
x86
-
linux
-
Not verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2169668 | 6u14 | Xiaobin Lu | P4 | Resolved | Fixed | b01 |
JDK-2152123 | OpenJDK6 | Joe Darcy | P3 | Closed | Not an Issue |
FULL PRODUCT VERSION :
java version "1.5.0_05"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05)
Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Linux em-09.fitc.org.ar 2.6.11-6mdk #1 Tue Mar 22 16:04:32 CET 2005 i686 Intel(R) Pentium(R) 4 CPU 2.26GHz unknown GNU/Linux
A DESCRIPTION OF THE PROBLEM :
The specification says that "all methods in this class [java.math.BigInteger] throw NullPointerException when passed a null object reference for any input parameter", but BigInteger.ZERO.multiply(null) returns 0.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
execute the sample program
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
NullPointerException to be throw
ACTUAL -
return BigInteger.ZERO
ERROR MESSAGES/STACK TRACES THAT OCCUR :
... the problem is there is no error message (but there should be)
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
public class ZeroByNull{
public static void main (String[] args){
System.out.println(java.math.BigInteger.ZERO.multiply(null));
}
}
---------- END SOURCE ----------
java version "1.5.0_05"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05)
Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Linux em-09.fitc.org.ar 2.6.11-6mdk #1 Tue Mar 22 16:04:32 CET 2005 i686 Intel(R) Pentium(R) 4 CPU 2.26GHz unknown GNU/Linux
A DESCRIPTION OF THE PROBLEM :
The specification says that "all methods in this class [java.math.BigInteger] throw NullPointerException when passed a null object reference for any input parameter", but BigInteger.ZERO.multiply(null) returns 0.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
execute the sample program
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
NullPointerException to be throw
ACTUAL -
return BigInteger.ZERO
ERROR MESSAGES/STACK TRACES THAT OCCUR :
... the problem is there is no error message (but there should be)
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
public class ZeroByNull{
public static void main (String[] args){
System.out.println(java.math.BigInteger.ZERO.multiply(null));
}
}
---------- END SOURCE ----------
- backported by
-
JDK-2169668 java.math.BigInteger.ZERO.multiply(null)
-
- Resolved
-
-
JDK-2152123 java.math.BigInteger.ZERO.multiply(null)
-
- Closed
-