8171374: GenGraphs should filter the rank grouping if the group is empty

Reviewed-by: alanb, psandoz
This commit is contained in:
Mandy Chung 2016-12-16 09:42:33 -08:00
parent 5028479313
commit 4484fde336

@ -214,13 +214,13 @@ public class GenGraphs {
// same ranks
ranks.stream()
.forEach(group -> out.format("{rank=same %s}%n",
descriptors.stream()
.map(ModuleDescriptor::name)
.filter(group::contains)
.map(mn -> "\"" + mn + "\"")
.collect(joining(","))
));
.map(group -> descriptors.stream()
.map(ModuleDescriptor::name)
.filter(group::contains)
.map(mn -> "\"" + mn + "\"")
.collect(joining(",")))
.filter(group -> group.length() > 0)
.forEach(group -> out.format("{rank=same %s}%n", group));
descriptors.stream()
.filter(jdkGroup::contains)