< prev index next >

src/java.base/share/classes/java/lang/module/ModuleFinder.java

Print this page

        

*** 31,41 **** import java.nio.file.Path; import java.nio.file.Paths; import java.security.AccessController; import java.security.Permission; import java.security.PrivilegedAction; - import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; --- 31,40 ----
*** 331,351 **** * subsequent module finder that are not located by previous module finders * in the sequence. * * <p> When locating modules then any exceptions or errors thrown by the * {@code find} or {@code findAll} methods of the underlying module finders ! * will be propogated to the caller of the resulting module finder's * {@code find} or {@code findAll} methods. </p> * * @param finders * The array of module finders * * @return A {@code ModuleFinder} that composes a sequence of module finders */ static ModuleFinder compose(ModuleFinder... finders) { ! final List<ModuleFinder> finderList = Arrays.asList(finders); ! finderList.forEach(Objects::requireNonNull); return new ModuleFinder() { private final Map<String, ModuleReference> nameToModule = new HashMap<>(); private Set<ModuleReference> allModules; --- 330,349 ---- * subsequent module finder that are not located by previous module finders * in the sequence. * * <p> When locating modules then any exceptions or errors thrown by the * {@code find} or {@code findAll} methods of the underlying module finders ! * will be propagated to the caller of the resulting module finder's * {@code find} or {@code findAll} methods. </p> * * @param finders * The array of module finders * * @return A {@code ModuleFinder} that composes a sequence of module finders */ static ModuleFinder compose(ModuleFinder... finders) { ! final List<ModuleFinder> finderList = List.of(finders); return new ModuleFinder() { private final Map<String, ModuleReference> nameToModule = new HashMap<>(); private Set<ModuleReference> allModules;
< prev index next >