8143048: Re-examine dependency on property sun.boot.class.path
authorjlahoda
Tue, 09 Aug 2016 20:27:06 +0200
changeset 40302 8c0d8d2c3519
parent 40301 c20170571b84
child 40303 96a1226aca18
8143048: Re-examine dependency on property sun.boot.class.path Summary: Removing obsolete references to sun.boot.class.path Reviewed-by: jjg
langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/file/Locations.java
langtools/test/tools/javac/processing/messager/MessagerDiags.java
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/file/Locations.java	Tue Aug 09 07:31:16 2016 -0700
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/file/Locations.java	Tue Aug 09 20:27:06 2016 +0200
@@ -773,14 +773,14 @@
         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 @@
             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 {
--- a/langtools/test/tools/javac/processing/messager/MessagerDiags.java	Tue Aug 09 07:31:16 2016 -0700
+++ b/langtools/test/tools/javac/processing/messager/MessagerDiags.java	Tue Aug 09 20:27:06 2016 +0200
@@ -80,7 +80,6 @@
     }
 
     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;