Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
2.5.9
-
None
-
None
-
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)
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)
Description
Using OpenJDK with Eclipse OpenJ9 JVM from https://adoptopenjdk.net/, the method JsonOutput.prettyPrint() generates a string which contains null bytes.
Test code
import groovy.json.JsonOutput String s = JsonOutput.prettyPrint('{"id":123}') println s.getBytes().encodeHex().toString() println s
Expected output
7b0a20202020226964223a203132330a7d
{
"id": 123
}
Actual output
7b0a20202020226964223a20313233000000000000000000000000000a7d
{
"id": 123
}