groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pascal Schumacher (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (GROOVY-6922) JsonSlurper loses trailing 0's in numbers (regression in Groovy 2.3)
Date Wed, 01 Jul 2015 19:22:05 GMT

     [ https://issues.apache.org/jira/browse/GROOVY-6922?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Pascal Schumacher updated GROOVY-6922:
--------------------------------------
    Affects Version/s:     (was: 2.3.3)
                           (was: 2.3.2)
                           (was: 2.3.1)
                       2.4.3

> JsonSlurper loses trailing 0's in numbers (regression in Groovy 2.3)
> --------------------------------------------------------------------
>
>                 Key: GROOVY-6922
>                 URL: https://issues.apache.org/jira/browse/GROOVY-6922
>             Project: Groovy
>          Issue Type: Bug
>          Components: JSON
>    Affects Versions: 2.3.0, 2.4.3
>            Reporter: Craig
>
> In previous versions of Grails before JsonSlurper was significantly changed, this test
passed. However, it fails in Groovy 2.3.x (tested up to 2.3.3).
> {code}
> void testParseNumWithDecimals() {
>    def i = parser.parseText('123.40')
>    BigDecimal i2 = 123.40G
>    assert i instanceof BigDecimal
>    assert i == i2
> }
> {code}
> This test should be added to https://github.com/groovy/groovy-core/blob/GROOVY_2_3_X/subprojects/groovy-json/src/test/groovy/groovy/json/JsonSlurperTest.groovy
> In Groovy 2.3.3, the assertion fails as i = 123.4G, not 123.40G.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message