changeset 40302:8c0d8d2c3519

8143048: Re-examine dependency on property sun.boot.class.path Summary: Removing obsolete references to sun.boot.class.path Reviewed-by: jjg
author jlahoda
date Tue, 09 Aug 2016 20:27:06 +0200
parents c20170571b84
children 96a1226aca18
files langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/file/Locations.java langtools/test/tools/javac/processing/messager/MessagerDiags.java
diffstat 2 files changed, 2 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- 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;