On Sun, 28 Mar 2021 13:38:51 GMT, Attila Szegedi <[email protected]> wrote:
>> I noticed that `javax.script.ScriptEngineManager` `getEngineByXxx` methods >> had a lot of code duplication among themselves, and even within each method. >> I refactored them into a modern unified implementation. While there I also >> took the opportunity to introduce `Objects.requireNonNull` in place of null >> checks followed by NPE throws, mark private fields final where possible, use >> lambdas for `doPrivileged` block, use `List.of` and `List.copyOf` where >> possible, and generally sanitize/deduplicate. > > Attila Szegedi has refreshed the contents of this pull request, and previous > commits have been removed. The incremental views will show differences > compared to the previous content of the PR. The pull request contains 13 new > commits since the last revision: > > - Tidy > - require non null in SimpleBindings > - Simplify SimpleScriptContext.scopes > - Mark fields final where possible > - Deduplicate registerEngineXxx methods > - Misc tidying > - Deduplicate exception reporting > - Lambdify > - Mark fields as final; eliminate now unnecessary init() method. > - Deduplicate engine creation and setup code > - ... and 3 more: > https://git.openjdk.java.net/jdk/compare/f378f350...56d89eb2 Marked as reviewed by sundar (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/3229
