>
> Could existing uses be relying on the exceptions being thrown when doing
> a new BigDecimal("")?
There is no doubt that changing the order of instanceof/nullity check the
outcome is different.
As you yourself pointed out new BigDecimal("") throws a
NumberFormatException.
AFAIU the toType take
Looking over the beginning snipet
if (toType == BigDecimal.class) {
return new BigDecimal((String) value);
} else if (toType == BigInteger.class) {
return new BigInteger((String) value);
} else if (toType.isPrimitive()) {