# HG changeset patch # User cushon # Date 1538453698 25200 # Node ID 08c296fe9458c548f8bbf91f0415b9ec74c12432 # Parent 2ef304ee001d8b6cf9a166e3cd07b7c1f50d4764 8211057: Gensrc step CompileProperties generates unstable CompilerProperties output Reviewed-by: mcimadamore, vromero diff -r 2ef304ee001d -r 08c296fe9458 make/langtools/tools/propertiesparser/gen/ClassGenerator.java --- a/make/langtools/tools/propertiesparser/gen/ClassGenerator.java Fri Sep 28 10:42:40 2018 +0200 +++ b/make/langtools/tools/propertiesparser/gen/ClassGenerator.java Mon Oct 01 21:14:58 2018 -0700 @@ -25,6 +25,8 @@ package propertiesparser.gen; +import static java.util.stream.Collectors.toList; + import propertiesparser.parser.Message; import propertiesparser.parser.MessageFile; import propertiesparser.parser.MessageInfo; @@ -44,11 +46,12 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; -import java.util.TreeSet; import java.util.List; import java.util.Map; +import java.util.Properties; import java.util.Set; -import java.util.Properties; +import java.util.TreeMap; +import java.util.TreeSet; import java.util.stream.Collectors; import java.util.stream.Stream; @@ -150,7 +153,11 @@ public void generateFactory(MessageFile messageFile, File outDir) { Map>> groupedEntries = messageFile.messages.entrySet().stream() - .collect(Collectors.groupingBy(e -> FactoryKind.parseFrom(e.getKey().split("\\.")[1]))); + .collect( + Collectors.groupingBy( + e -> FactoryKind.parseFrom(e.getKey().split("\\.")[1]), + TreeMap::new, + toList())); //generate nested classes List nestedDecls = new ArrayList<>(); Set importedTypes = new TreeSet<>();