diff --git a/jdtls.ext/com.microsoft.jdtls.ext.core/src/com/microsoft/jdtls/ext/core/PackageCommand.java b/jdtls.ext/com.microsoft.jdtls.ext.core/src/com/microsoft/jdtls/ext/core/PackageCommand.java index 1bb2e99b..cada8754 100644 --- a/jdtls.ext/com.microsoft.jdtls.ext.core/src/com/microsoft/jdtls/ext/core/PackageCommand.java +++ b/jdtls.ext/com.microsoft.jdtls.ext.core/src/com/microsoft/jdtls/ext/core/PackageCommand.java @@ -14,6 +14,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; +import java.util.EnumMap; import java.util.HashMap; import java.util.LinkedList; import java.util.List; @@ -78,7 +79,7 @@ public class PackageCommand { private static final Map>> commands; static { - commands = new HashMap<>(); + commands = new EnumMap<>(NodeKind.class); commands.put(NodeKind.PROJECT, PackageCommand::getProjectChildren); commands.put(NodeKind.CONTAINER, PackageCommand::getContainerChildren); commands.put(NodeKind.PACKAGEROOT, PackageCommand::getPackageRootChildren);