[ https://issues.apache.org/jira/browse/LANG-1445?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17235732#comment-17235732 ]
Arturo Bernal edited comment on LANG-1445 at 1/3/21, 7:54 AM: -------------------------------------------------------------- HI [~ggregory] IMO this improvement its already implemented. I think we can close the issues; was (Author: arturobernalg): HI [~ggregory] This improvement its already implemented. We can close the issues; > NumberUtils.createNumber() incorrectly creates BigDecimal when a double type > is specified > ----------------------------------------------------------------------------------------- > > Key: LANG-1445 > URL: https://issues.apache.org/jira/browse/LANG-1445 > Project: Commons Lang > Issue Type: Bug > Components: lang.math.* > Affects Versions: 3.8.1 > Reporter: Costa Theodosiou > Priority: Major > Attachments: > NumberUtils_createNumber()_incorrectly_creates_BigDecimal_when_a_double_type_is_specified.patch > > > {{NumberUtils.createNumber(Double.valueOf(Double.MIN_VALUE).toString() + > "D")}} > and > {{NumberUtils.createNumber(Double.valueOf(Double.MIN_VALUE).toString() + > "F")}} > are incorrectly creating BigDecimals. > This is due to a bug: > {{if (!(d.isInfinite() || d.floatValue() == 0.0D && !allZeros)) {}} > which should be: > {{if (!(d.isInfinite() || d.doubleValue() == 0.0D && !allZeros)) {}} > A patch has been attached. -- This message was sent by Atlassian Jira (v8.3.4#803005)