diff --git a/src/share/classes/com/sun/tools/jdeps/PlatformClassPath.java b/src/share/classes/com/sun/tools/jdeps/PlatformClassPath.java index 115f87e34f091c331b4617231b23f76498cac3ce..9fd075c673c82f4680aa36d886b3f127697cb023 100644 --- a/src/share/classes/com/sun/tools/jdeps/PlatformClassPath.java +++ b/src/share/classes/com/sun/tools/jdeps/PlatformClassPath.java @@ -46,7 +46,7 @@ import static com.sun.tools.classfile.Attribute.*; */ class PlatformClassPath { private static final List NON_PLATFORM_JARFILES = - Arrays.asList("alt-rt.jar", "jfxrt.jar", "ant-javafx.jar", "javafx-mx.jar"); + Arrays.asList("alt-rt.jar", "ant-javafx.jar", "javafx-mx.jar"); private static final List javaHomeArchives = init(); static List getArchives() { @@ -124,6 +124,14 @@ class PlatformClassPath { */ static class JDKArchive extends Archive { private static List PROFILE_JARS = Arrays.asList("rt.jar", "jce.jar"); + // Workaround: The following packages are not annotated as jdk.Exported + private static List EXPORTED_PACKAGES = Arrays.asList( + "javax.jnlp", + "org.w3c.dom.css", + "org.w3c.dom.html", + "org.w3c.dom.stylesheets", + "org.w3c.dom.xpath" + ); public static boolean isProfileArchive(Archive archive) { if (archive instanceof JDKArchive) { return PROFILE_JARS.contains(archive.getName()); @@ -155,7 +163,11 @@ class PlatformClassPath { * Tests if a given package name is exported. */ public boolean isExportedPackage(String pn) { - if (Profile.getProfile(pn) != null || "javax.jnlp".equals(pn)) { + if (Profile.getProfile(pn) != null) { + return true; + } + // special case for JavaFX and APIs that are not annotated with @jdk.Exported) + if (EXPORTED_PACKAGES.contains(pn) || pn.startsWith("javafx.")) { return true; } return exportedPackages.containsKey(pn) ? exportedPackages.get(pn) : false; diff --git a/test/tools/jdeps/APIDeps.java b/test/tools/jdeps/APIDeps.java index c3d2c9977f7e1c0c454de04140540eb0018b4a5b..25859dcaedde1cbe8251a55a40bb3dbfcec077e2 100644 --- a/test/tools/jdeps/APIDeps.java +++ b/test/tools/jdeps/APIDeps.java @@ -90,8 +90,9 @@ public class APIDeps { new String[] {"-classpath", testDir.getPath(), "-verbose:class", "-filter:none", "-P"}); test(new File(mDir, "Gee.class"), new String[] {"g.G", "sun.misc.Lock", "com.sun.tools.classfile.ClassFile", - "com.sun.management.ThreadMXBean", "com.sun.source.tree.BinaryTree"}, - new String[] {testDirBasename, "JDK internal API", "compact3", ""}, + "com.sun.management.ThreadMXBean", "com.sun.source.tree.BinaryTree", + "org.w3c.dom.css.CSSValue"}, + new String[] {testDirBasename, "JDK internal API", "compact2", "compact3", ""}, new String[] {"-classpath", testDir.getPath(), "-verbose", "-P"}); // -jdkinternals diff --git a/test/tools/jdeps/m/Gee.java b/test/tools/jdeps/m/Gee.java index 0020b18da6befa4e96768ab0584062b149f8dce2..aabc50ca8982856f9e1f5e1144f597faaad4c315 100644 --- a/test/tools/jdeps/m/Gee.java +++ b/test/tools/jdeps/m/Gee.java @@ -29,4 +29,5 @@ class Gee extends g.G { public com.sun.tools.classfile.ClassFile cf; // @jdk.Exported(false) public com.sun.source.tree.BinaryTree tree; // @jdk.Exported public com.sun.management.ThreadMXBean mxbean; // @jdk.Exported on package-info + public org.w3c.dom.css.CSSValue value; // special case }