Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.7.10
-
None
Description
Using the add operator on null BigDecimal objects concatenates them as Strings
@Test void testNullBigDecimalAddOperator() { BigDecimal a = null BigDecimal b = null assert null == a+b }
Assertion failed: assert null == a+b | ||| | ||null | |nullnull | null false
I would expect a NullPointer would be thrown as the divide operator behaves.
@Test(expected=NullPointerException) void testNullBigDecimalDivOperator() { BigDecimal a = null BigDecimal b = null assert null == a/b }
java.lang.NullPointerException: Cannot invoke method div() on null object