8221473: Configuration::reads can use Set.copyOf

Reviewed-by: alanb, forax
This commit is contained in:
Claes Redestad 2019-03-26 15:20:23 +01:00
parent 93e77e1767
commit 274396e105

View file

@ -575,7 +575,8 @@ public final class Configuration {
}
Set<ResolvedModule> reads(ResolvedModule m) {
return Collections.unmodifiableSet(graph.get(m));
// The sets stored in the graph are already immutable sets
return Set.copyOf(graph.get(m));
}
/**