Thu, 21 May 2015 11:14:23 -0700
8080815: Update 8u jdeps list of internal APIs
Reviewed-by: dfuchs
1.1 --- a/src/share/classes/com/sun/tools/jdeps/PlatformClassPath.java Wed May 20 17:11:28 2015 -0700 1.2 +++ b/src/share/classes/com/sun/tools/jdeps/PlatformClassPath.java Thu May 21 11:14:23 2015 -0700 1.3 @@ -46,7 +46,7 @@ 1.4 */ 1.5 class PlatformClassPath { 1.6 private static final List<String> NON_PLATFORM_JARFILES = 1.7 - Arrays.asList("alt-rt.jar", "jfxrt.jar", "ant-javafx.jar", "javafx-mx.jar"); 1.8 + Arrays.asList("alt-rt.jar", "ant-javafx.jar", "javafx-mx.jar"); 1.9 private static final List<Archive> javaHomeArchives = init(); 1.10 1.11 static List<Archive> getArchives() { 1.12 @@ -124,6 +124,14 @@ 1.13 */ 1.14 static class JDKArchive extends Archive { 1.15 private static List<String> PROFILE_JARS = Arrays.asList("rt.jar", "jce.jar"); 1.16 + // Workaround: The following packages are not annotated as jdk.Exported 1.17 + private static List<String> EXPORTED_PACKAGES = Arrays.asList( 1.18 + "javax.jnlp", 1.19 + "org.w3c.dom.css", 1.20 + "org.w3c.dom.html", 1.21 + "org.w3c.dom.stylesheets", 1.22 + "org.w3c.dom.xpath" 1.23 + ); 1.24 public static boolean isProfileArchive(Archive archive) { 1.25 if (archive instanceof JDKArchive) { 1.26 return PROFILE_JARS.contains(archive.getName()); 1.27 @@ -155,7 +163,11 @@ 1.28 * Tests if a given package name is exported. 1.29 */ 1.30 public boolean isExportedPackage(String pn) { 1.31 - if (Profile.getProfile(pn) != null || "javax.jnlp".equals(pn)) { 1.32 + if (Profile.getProfile(pn) != null) { 1.33 + return true; 1.34 + } 1.35 + // special case for JavaFX and APIs that are not annotated with @jdk.Exported) 1.36 + if (EXPORTED_PACKAGES.contains(pn) || pn.startsWith("javafx.")) { 1.37 return true; 1.38 } 1.39 return exportedPackages.containsKey(pn) ? exportedPackages.get(pn) : false;
2.1 --- a/test/tools/jdeps/APIDeps.java Wed May 20 17:11:28 2015 -0700 2.2 +++ b/test/tools/jdeps/APIDeps.java Thu May 21 11:14:23 2015 -0700 2.3 @@ -90,8 +90,9 @@ 2.4 new String[] {"-classpath", testDir.getPath(), "-verbose:class", "-filter:none", "-P"}); 2.5 test(new File(mDir, "Gee.class"), 2.6 new String[] {"g.G", "sun.misc.Lock", "com.sun.tools.classfile.ClassFile", 2.7 - "com.sun.management.ThreadMXBean", "com.sun.source.tree.BinaryTree"}, 2.8 - new String[] {testDirBasename, "JDK internal API", "compact3", ""}, 2.9 + "com.sun.management.ThreadMXBean", "com.sun.source.tree.BinaryTree", 2.10 + "org.w3c.dom.css.CSSValue"}, 2.11 + new String[] {testDirBasename, "JDK internal API", "compact2", "compact3", ""}, 2.12 new String[] {"-classpath", testDir.getPath(), "-verbose", "-P"}); 2.13 2.14 // -jdkinternals
3.1 --- a/test/tools/jdeps/m/Gee.java Wed May 20 17:11:28 2015 -0700 3.2 +++ b/test/tools/jdeps/m/Gee.java Thu May 21 11:14:23 2015 -0700 3.3 @@ -29,4 +29,5 @@ 3.4 public com.sun.tools.classfile.ClassFile cf; // @jdk.Exported(false) 3.5 public com.sun.source.tree.BinaryTree tree; // @jdk.Exported 3.6 public com.sun.management.ThreadMXBean mxbean; // @jdk.Exported on package-info 3.7 + public org.w3c.dom.css.CSSValue value; // special case 3.8 }