RFR: 8242934: test/jdk/jdk/jfr/tool/TestPrintJSON.java uses nashorn script engine
Erik Gahlin
erik.gahlin at oracle.com
Tue May 12 22:02:26 UTC 2020
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