RFR: 8242934: test/jdk/jdk/jfr/tool/TestPrintJSON.java uses nashorn script engine
Markus Gronlund
markus.gronlund at oracle.com
Wed May 13 13:55:06 UTC 2020
Looks good.
Thanks
Markus
-----Original Message-----
From: Erik Gahlin
Sent: den 13 maj 2020 00:02
To: hotspot-jfr-dev <hotspot-jfr-dev at openjdk.java.net>
Subject: RFR: 8242934: test/jdk/jdk/jfr/tool/TestPrintJSON.java uses nashorn script engine
Hi,
Could I have review of a test fix.
Recently the Nashorn Javascript engine was removed from the JDK. This change adds back a JSON parser that can be used to verify the output from the jfr tool. The code is based on the parser used in the Skara project [1].
I removed method and classes not needed for verification and a added a size() method so it is easy to check the number of fields a JSON object has. I removed some allocation that occurred when JSONObjects and JSONArrays were created. I also changed the implementation of the isDigit() method so it is now c >= '0' && c <= ‘9’.
I also removed TestHidden.java from the ProblemList.txt as the test has already been fixed.
Bug:
https://bugs.openjdk.java.net/browse/JDK-8242934
Webrev:
http://cr.openjdk.java.net/~egahlin/8242934/
Testing: 100 times with different recordings on different platforms.
Thanks
Erik
[1] https://github.com/openjdk/skara <https://github.com/openjdk/skara>
More information about the hotspot-jfr-dev
mailing list