From 21827bed2acd21f12e85e6958e9d79e19beb3273 Mon Sep 17 00:00:00 2001 From: nik Date: Wed, 6 Apr 2016 19:51:14 +0300 Subject: [PATCH] create module library from files: use LinkedHashMap to fix blinking tests --- .../ui/configuration/classpath/CreateModuleLibraryChooser.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/classpath/CreateModuleLibraryChooser.java b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/classpath/CreateModuleLibraryChooser.java index 43a9d0886fd6..1744c0918e02 100644 --- a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/classpath/CreateModuleLibraryChooser.java +++ b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/classpath/CreateModuleLibraryChooser.java @@ -197,7 +197,7 @@ public class CreateModuleLibraryChooser implements ClasspathElementChooser addedLibraries = new ArrayList(); - Map> byFile = roots.stream().collect(Collectors.groupingBy(OrderRoot::getFile)); + Map> byFile = roots.stream().collect(Collectors.groupingBy(OrderRoot::getFile, LinkedHashMap::new, Collectors.toList())); Predicate> containsClasses = it -> it.stream().anyMatch(root -> root.getType().equals(OrderRootType.CLASSES)); if (byFile.values().stream().allMatch(containsClasses)) { for (List rootsForFile : byFile.values()) {