This makes unneeded copies, move over to Iterable-based sort.
Change-Id: I58d4b6b31e4e7927c1139bc6e2920a4e783597f8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
* Instead of doing this on each invocation of getModules(), pre-compute
* it once and keep it around -- better than the set we got in.
*/
- this.modules = ImmutableSet.copyOf(ModuleDependencySort.sort(modules.toArray(new Module[modules.size()])));
+ this.modules = ImmutableSet.copyOf(ModuleDependencySort.sort(modules));
/*
* The most common lookup is from Namespace->Module.