# HG changeset patch # User mchung # Date 1481910153 28800 # Node ID b59eb84f0b0fdc343909b9751006c1261bd70706 # Parent 6059f74bacdfbd966a43fff8d8514d2a1a550348 8171374: GenGraphs should filter the rank grouping if the group is empty Reviewed-by: alanb, psandoz diff -r 6059f74bacdf -r b59eb84f0b0f jdk/make/src/classes/build/tools/jigsaw/GenGraphs.java --- a/jdk/make/src/classes/build/tools/jigsaw/GenGraphs.java Fri Dec 16 17:20:37 2016 +0000 +++ b/jdk/make/src/classes/build/tools/jigsaw/GenGraphs.java Fri Dec 16 09:42:33 2016 -0800 @@ -214,13 +214,13 @@ // 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)