8170987: Module system implementation refresh (12/2016)

8170859: Run time and tool support for ModuleResolution

Co-authored-by: Mandy Chung <mandy.chung@oracle.com>
Co-authored-by: Chris Hegarty <chris.hegarty@oracle.com>
Co-authored-by: Mark Reinhold <mark.reinhold@oracle.com>
Co-authored-by: John Rose <john.r.rose@oracle.com>
Reviewed-by: redestad, mchung, alanb
This commit is contained in:
Alan Bateman 2016-12-16 06:19:16 +00:00
parent 1868b301b8
commit 1e82db676a
77 changed files with 4039 additions and 1356 deletions

View file

@ -42,6 +42,8 @@ import java.util.Objects;
import java.util.Optional;
import java.util.Set;
import jdk.internal.module.ModulePath;
import jdk.internal.module.SystemModuleFinder;
import sun.security.action.GetPropertyAction;
/**
@ -137,7 +139,7 @@ public interface ModuleFinder {
/**
* Returns a module finder that locates the <em>system modules</em>. The
* system modules are typically linked into the Java run-time image.
* system modules are the modules in the Java run-time image.
* The module finder will always find {@code java.base}.
*
* <p> If there is a security manager set then its {@link
@ -166,7 +168,7 @@ public interface ModuleFinder {
Path modules = Paths.get(home, "lib", "modules");
if (Files.isRegularFile(modules)) {
return new SystemModuleFinder();
return SystemModuleFinder.getInstance();
} else {
Path mlib = Paths.get(home, "modules");
if (Files.isDirectory(mlib)) {