diff -r 2e21ecd7a5ad -r fd3fdaff0257 src/share/classes/com/sun/tools/jdeps/PlatformClassPath.java --- a/src/share/classes/com/sun/tools/jdeps/PlatformClassPath.java Thu Mar 14 08:30:16 2013 +0000 +++ b/src/share/classes/com/sun/tools/jdeps/PlatformClassPath.java Thu Mar 14 10:33:31 2013 -0700 @@ -37,34 +37,6 @@ * ClassPath for Java SE and JDK */ class PlatformClassPath { - /* - * Profiles for Java SE - * - * This is a temporary workaround until a common API is defined for langtools - * to determine which profile a given classname belongs to. The list of - * packages and profile names are hardcoded in jdk.properties and - * split packages are not supported. - */ - static class Profile { - final String name; - final Set packages; - - Profile(String name) { - this.name = name; - this.packages = new HashSet(); - } - } - - private final static String JAVAFX = "javafx"; - private final static Map map = getProfilePackages(); - static String getProfileName(String packageName) { - Profile profile = map.get(packageName); - if (packageName.startsWith(JAVAFX + ".")) { - profile = map.get(JAVAFX); - } - return profile != null ? profile.name : ""; - } - private final static List javaHomeArchives = init(); static List getArchives() { return javaHomeArchives; @@ -100,13 +72,6 @@ } catch (IOException e) { throw new RuntimeException(e); } - - // add a JavaFX profile if there is jfxrt.jar - for (Archive archive : result) { - if (archive.getFileName().equals("jfxrt.jar")) { - map.put(JAVAFX, new Profile("jfxrt.jar")); - } - } return result; } @@ -140,30 +105,4 @@ }); return result; } - - private static Map getProfilePackages() { - Map map = new HashMap(); - - // read the properties as a ResourceBundle as the build compiles - // the properties file into Java class. Another alternative is - // to load it as Properties and fix the build to exclude this file. - ResourceBundle profileBundle = - ResourceBundle.getBundle("com.sun.tools.jdeps.resources.jdk"); - - int i=1; - String key; - while (profileBundle.containsKey((key = "profile." + i + ".name"))) { - Profile profile = new Profile(profileBundle.getString(key)); - String n = profileBundle.getString("profile." + i + ".packages"); - String[] pkgs = n.split("\\s+"); - for (String p : pkgs) { - if (p.isEmpty()) continue; - assert(map.containsKey(p) == false); - profile.packages.add(p); - map.put(p, profile); - } - i++; - } - return map; - } }