Due to the removal of Nashorn, the scripts that process pandoc json AST files need to be rewritten in Java.

This patch replaces the javascript transformation filters with the same functionality in Java. I have verified using the compare script that the output is indeed unchanged. I have also reverted the change in JDK-8243109 which was a workaround for bootcycle images, which stopped working when Nashorn was removed from the JDK. (Since it's still present in the Boot JDK, everything except bootcycle images still work fine for JDK 15.)

The JSON parser comes from Project Skara. I have made a few patches, which cleans up some code (to stop IntelliJ from complaining about ugliness), and added some functionality that was needed by this use case. For those who are interested, the patchset compared to the upstream Skara code is here: http://cr.openjdk.java.net/~ihse/skara-json-patches/webrev.01/. I will talk with Project Skara to see if they are interested in incorporating this patch, so the code bases do not diverge.

Bug: https://bugs.openjdk.java.net/browse/JDK-8246435
WebRev: http://cr.openjdk.java.net/~ihse/JDK-8246435-pandoc-filters-in-java/webrev.01

/Magnus

Reply via email to