8143048: Re-examine dependency on property sun.boot.class.path

Removing obsolete references to sun.boot.class.path

Reviewed-by: jjg
This commit is contained in:
Jan Lahoda 2016-08-09 20:27:06 +02:00
parent cd9b88b93d
commit 39de28475b
2 changed files with 2 additions and 23 deletions

View File

@ -773,14 +773,14 @@ public class Locations {
private Collection<Path> systemClasses() throws IOException {
// Return "modules" jimage file if available
if (Files.isRegularFile(thisSystemModules)) {
return addAdditionalBootEntries(Collections.singleton(thisSystemModules));
return Collections.singleton(thisSystemModules);
}
// Exploded module image
Path modules = javaHome.resolve("modules");
if (Files.isDirectory(modules.resolve("java.base"))) {
try (Stream<Path> listedModules = Files.list(modules)) {
return addAdditionalBootEntries(listedModules.collect(Collectors.toList()));
return listedModules.collect(Collectors.toList());
}
}
@ -788,26 +788,6 @@ public class Locations {
return null;
}
//ensure bootclasspath prepends/appends are reflected in the systemClasses
private Collection<Path> addAdditionalBootEntries(Collection<Path> modules) throws IOException {
String files = System.getProperty("sun.boot.class.path");
if (files == null)
return modules;
Set<Path> paths = new LinkedHashSet<>();
// The JVM no longer supports -Xbootclasspath/p:, so any interesting
// entries should be appended to the set of modules.
paths.addAll(modules);
for (String s : files.split(Pattern.quote(File.pathSeparator))) {
paths.add(getPath(s));
}
return paths;
}
private void lazy() {
if (searchPath == null) {
try {

View File

@ -80,7 +80,6 @@ public class MessagerDiags extends AbstractProcessor {
}
public static void main(String... args) throws IOException {
final String bootPath = System.getProperty("sun.boot.class.path");
final JavaCompiler tool = ToolProvider.getSystemJavaCompiler();
assert tool != null;