Switch from the Nashorn engine to Graal.js for executing the the export-site-tree script #234
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes: #232
The Nashorn engine supports only a limited set of ES6 features, which has resulted in the issue reported here. This issue was reproduced with OpenJDK 11 but not with OpenJDK 17. The Nashorn engine was deprecated in JDK 11(JEP 335) and removed in JDK 15 (JEP 372). This explains why ZAP fails when using the Nashorn engine with inline scripts in OpenJDK 17; the engine cannot be found in this context. However, the same version of OpenJDK works when the script is not inline.
To prevent similar issues in the future, I have switched to the Graal.js engine. Since the release of ZAP 2.14, Graal.js has been the recommended JavaScript engine. For more information, please see this