mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-16 09:04:41 +02:00
8196959: NullPointerException in discovery003.java
Fixed corner case of having engineName as NULL Reviewed-by: jlaskey
This commit is contained in:
parent
a95d50a5fc
commit
8a170b8042
5 changed files with 176 additions and 1 deletions
|
@ -77,7 +77,10 @@ public class ScriptEngineManager {
|
|||
|
||||
private void init(final ClassLoader loader) {
|
||||
globalScope = new SimpleBindings();
|
||||
engineSpis = new TreeSet<ScriptEngineFactory>(Comparator.comparing(ScriptEngineFactory::getEngineName));
|
||||
engineSpis = new TreeSet<ScriptEngineFactory>(Comparator.comparing(
|
||||
ScriptEngineFactory::getEngineName,
|
||||
Comparator.nullsLast(Comparator.naturalOrder()))
|
||||
);
|
||||
nameAssociations = new HashMap<String, ScriptEngineFactory>();
|
||||
extensionAssociations = new HashMap<String, ScriptEngineFactory>();
|
||||
mimeTypeAssociations = new HashMap<String, ScriptEngineFactory>();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue