NumberBigDecimalConverter class, when constructing a target BigDecimal instance, uses new BigDecimal(double) constructor which can cause floating point error, as described in constructor's javadoc.
Use case example: when used with jooq, this implementation causes unexpected behavior: numeric non-integer value stored in DB is presented in biased incorrect BigInteger value in target entity.
As per javadoc, it is recommended to use either BigDecimal(String) constructor or BigDecimal.valueOf(double) method.
NumberBigDecimalConverter class, when constructing a target BigDecimal instance, uses new BigDecimal(double) constructor which can cause floating point error, as described in constructor's javadoc. Use case example: when used with jooq, this implementation causes unexpected behavior: numeric non-integer value stored in DB is presented in biased incorrect BigInteger value in target entity.
As per javadoc, it is recommended to use either BigDecimal(String) constructor or BigDecimal.valueOf(double) method.