mirror of https://github.com/apache/kafka.git
KAFKA-9642: Change "BigDecimal(double)" constructor to "BigDecimal.valueOf(double)" (#8212)
Co-authored-by: Soontaek Lim <soontaek.lim@ultratendency.com> Reviewers: Guozhang Wang <wangguoz@gmail.com>
This commit is contained in:
parent
371ad143a6
commit
179be72e30
|
@ -421,7 +421,7 @@ public class Values {
|
|||
if (value instanceof Number) {
|
||||
// Not already a decimal, so treat it as a double ...
|
||||
double converted = ((Number) value).doubleValue();
|
||||
return new BigDecimal(converted);
|
||||
return BigDecimal.valueOf(converted);
|
||||
}
|
||||
if (value instanceof String) {
|
||||
return new BigDecimal(value.toString()).doubleValue();
|
||||
|
|
Loading…
Reference in New Issue