-
Bug
-
Resolution: Fixed
-
P4
-
9
-
b82
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8142276 | emb-9 | Attila Szegedi | P4 | Resolved | Fixed | team |
JDK-8140995 | 8u91 | Attila Szegedi | P4 | Resolved | Fixed | b01 |
JDK-8136916 | 8u72 | Attila Szegedi | P4 | Resolved | Fixed | b01 |
JDK-8147364 | emb-8u91 | Attila Szegedi | P4 | Resolved | Fixed | b01 |
Nashorn's CodeInstaller API has few problems:
- the type parameter <T> is unnecessary, as we only have one specialization for <ScriptEnvironment>
- accordingly, "T getOwner()" should be changed to "ScriptEnvironment getScriptEnvironment()". Better yet, "Context getContext()"
Nashorn's Compiler constructors are horrendous and it's not entirely clear which one is for what purpose. This could be somewhat remedied by:
- replacing them with static factory methods with descriptive names, and
- when CodeInstaller is passed, neither Context, ScriptEnvironment, nor ErrorManager need to be passed as they can all be reached through the CodeInstaller if we have the above proposed CodeInstaller.getContext(). In some cases (eval implementation), ErrorManager should still be passed as something other than Context.errMan is used.
- the type parameter <T> is unnecessary, as we only have one specialization for <ScriptEnvironment>
- accordingly, "T getOwner()" should be changed to "ScriptEnvironment getScriptEnvironment()". Better yet, "Context getContext()"
Nashorn's Compiler constructors are horrendous and it's not entirely clear which one is for what purpose. This could be somewhat remedied by:
- replacing them with static factory methods with descriptive names, and
- when CodeInstaller is passed, neither Context, ScriptEnvironment, nor ErrorManager need to be passed as they can all be reached through the CodeInstaller if we have the above proposed CodeInstaller.getContext(). In some cases (eval implementation), ErrorManager should still be passed as something other than Context.errMan is used.
- backported by
-
JDK-8136916 Sanitize CodeInstaller and Compiler API
-
- Resolved
-
-
JDK-8140995 Sanitize CodeInstaller and Compiler API
-
- Resolved
-
-
JDK-8142276 Sanitize CodeInstaller and Compiler API
-
- Resolved
-
-
JDK-8147364 Sanitize CodeInstaller and Compiler API
-
- Resolved
-