[ 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)