You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Pascal Schumacher (JIRA)" <ji...@apache.org> on 2015/11/10 21:56:10 UTC
[jira] [Resolved] (GROOVY-6922) JsonSlurper loses trailing 0's in
numbers (regression in Groovy 2.3)
[ https://issues.apache.org/jira/browse/GROOVY-6922?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pascal Schumacher resolved GROOVY-6922.
---------------------------------------
Resolution: Fixed
Assignee: Pascal Schumacher
Fix Version/s: 2.4.6
Pull request merged. Thanks!
> 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
> Assignee: Pascal Schumacher
> Fix For: 2.4.6
>
>
> 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)