You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Giovanni Pardini (Jira)" <ji...@apache.org> on 2020/02/15 19:02:00 UTC
[jira] [Updated] (GROOVY-9401) JsonOutput.prettyPrint generates
string with null bytes on OpenJ9 JVM
[ https://issues.apache.org/jira/browse/GROOVY-9401?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Giovanni Pardini updated GROOVY-9401:
-------------------------------------
Description:
Using OpenJDK with Eclipse OpenJ9 JVM from [https://adoptopenjdk.net/,] the method JsonOutput.prettyPrint() generates a string which contains null bytes.
h3. {{TEST CODE}}
{{import groovy.json.JsonOutput}}
{{String s = JsonOutput.prettyPrint('\{"id":123}')}}
{{println s.getBytes().encodeHex().toString()}}
{{println s}}
h3. {{OUTPUT}}
{{7b0a20202020226964223a20313233000000000000000000000000000a7d}}
{{{}}
{{ "id": 123}}
{{}}}
was:
Using OpenJDK with Eclipse OpenJ9 JVM from [https://adoptopenjdk.net/,] the method JsonOutput.prettyPrint() generates a string which contains null bytes.
h3. {{TEST CODE}}
{{import groovy.json.JsonOutput}}
{{String s = JsonOutput.prettyPrint('\{"id":123}')}}
{{println s.getBytes().encodeHex().toString()}}
{{println s}}
h3. {{OUTPUT}}
{{7b0a20202020226964223a20313233000000000000000000000000000a7d}}
{{{}}
{{ "id": 123}}
{{}}}
> JsonOutput.prettyPrint generates string with null bytes on OpenJ9 JVM
> ---------------------------------------------------------------------
>
> Key: GROOVY-9401
> URL: https://issues.apache.org/jira/browse/GROOVY-9401
> Project: Groovy
> Issue Type: Bug
> Components: JSON
> Affects Versions: 2.5.9
> Environment: Ubuntu 18.04.4 LTS
> JVM
> DEB package: adoptopenjdk-8-openj9 8u242-b08.openj9-0.18.1-2
> openjdk version "1.8.0_242"
> OpenJDK Runtime Environment (build 1.8.0_242-b08)
> Eclipse OpenJ9 VM (build openj9-0.18.1, JRE 1.8.0 Linux amd64-64-Bit Compressed References 20200122_511 (JIT enabled, AOT enabled)
> OpenJ9 - 51a5857d2
> OMR - 7a1b0239a
> JCL - 8cf8a30581 based on jdk8u242-b08)
> Reporter: Giovanni Pardini
> Priority: Major
> Fix For: 3.0.0
>
>
> Using OpenJDK with Eclipse OpenJ9 JVM from [https://adoptopenjdk.net/,] the method JsonOutput.prettyPrint() generates a string which contains null bytes.
> h3. {{TEST CODE}}
> {{import groovy.json.JsonOutput}}
> {{String s = JsonOutput.prettyPrint('\{"id":123}')}}
> {{println s.getBytes().encodeHex().toString()}}
> {{println s}}
> h3. {{OUTPUT}}
> {{7b0a20202020226964223a20313233000000000000000000000000000a7d}}
> {{{}}
> {{ "id": 123}}
> {{}}}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)