提交 4658d7d5 编写于 作者: M mchung

8080815: Update 8u jdeps list of internal APIs

Reviewed-by: dfuchs
上级 8b358888
......@@ -46,7 +46,7 @@ import static com.sun.tools.classfile.Attribute.*;
*/
class PlatformClassPath {
private static final List<String> 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<Archive> javaHomeArchives = init();
static List<Archive> getArchives() {
......@@ -124,6 +124,14 @@ class PlatformClassPath {
*/
static class JDKArchive extends Archive {
private static List<String> PROFILE_JARS = Arrays.asList("rt.jar", "jce.jar");
// Workaround: The following packages are not annotated as jdk.Exported
private static List<String> 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;
......
......@@ -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
......
......@@ -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
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册