FULL PRODUCT VERSION :
C:\JAVA\jdk1.6.0_14_32bit\bin>java -version
java version "1.6.0_14"
Java(TM) SE Runtime Environment (build 1.6.0_14-b08)
Java HotSpot(TM) Client VM (build 14.0-b16, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Windows XP Pro 64 bit, SP2
A DESCRIPTION OF THE PROBLEM :
The following code runs fine under JDK 1.6.0_12, but fails with a NullPointerException in JDK 1.6.0_14
public void testCanApproximateLogWithInputTerms() {
BigDecimal x = BigDecimal.valueOf(8L, 1);
BigDecimal xPower = BigDecimal.valueOf(-1L);
for (int i = 0; i < 100; i++) {
xPower = xPower.multiply(x);
}
}
java.lang.NullPointerException
at java.math.BigDecimal.multiply(BigDecimal.java:1312)
at com.rtrms.math.EulersSumTest.testCanApproximateLogWithInputTerms(EulersSumTest.java:25)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:40)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Excecute the test code listed above
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The code should run without error
ACTUAL -
java.lang.NullPointerException
at java.math.BigDecimal.multiply(BigDecimal.java:1312)
at com.rtrms.math.EulersSumTest.testCanApproximateLogWithInputTerms(EulersSumTest.java:25)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:40)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
ERROR MESSAGES/STACK TRACES THAT OCCUR :
java.lang.NullPointerException
at java.math.BigDecimal.multiply(BigDecimal.java:1312)
at com.rtrms.math.EulersSumTest.testCanApproximateLogWithInputTerms(EulersSumTest.java:25)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:40)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
public void testCanApproximateLogWithInputTerms() {
BigDecimal x = BigDecimal.valueOf(8L, 1);
BigDecimal xPower = BigDecimal.valueOf(-1L);
for (int i = 0; i < 100; i++) {
xPower = xPower.multiply(x);
}
}
---------- END SOURCE ----------
Release Regression From : 6u12
The above release value was the last known release where this
bug was not reproducible. Since then there has been a regression.