changeset 16553:e4fcda859df2

8173082: java/bean/* tests fail since change of JDK-8055206 Reviewed-by: mchung, ahgross, alanb
author mullan
date Mon, 23 Jan 2017 07:34:11 -0500
parents 7eacab16d40e
children 3b9c8ef4b153
files src/java.base/share/lib/security/default.policy test/ProblemList.txt test/java/lang/SecurityManager/CheckPackageAccess.java test/sun/security/provider/PolicyFile/TokenStore.java
diffstat 4 files changed, 12 insertions(+), 35 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/lib/security/default.policy	Sat Jan 21 14:31:57 2017 -0800
+++ b/src/java.base/share/lib/security/default.policy	Mon Jan 23 07:34:11 2017 -0500
@@ -205,3 +205,11 @@
 grant codeBase "jrt:/jdk.desktop" {
     permission java.lang.RuntimePermission "accessClassInPackage.com.sun.awt";
 };
+
+// permissions needed by applications using java.desktop module
+grant {
+    permission java.lang.RuntimePermission "accessClassInPackage.com.sun.beans";
+    permission java.lang.RuntimePermission "accessClassInPackage.com.sun.beans.*";
+    permission java.lang.RuntimePermission "accessClassInPackage.com.sun.java.swing.plaf.*";
+    permission java.lang.RuntimePermission "accessClassInPackage.com.apple.*";
+};
--- a/test/ProblemList.txt	Sat Jan 21 14:31:57 2017 -0800
+++ b/test/ProblemList.txt	Mon Jan 23 07:34:11 2017 -0500
@@ -118,35 +118,6 @@
 
 java/beans/Introspector/8132566/OverridePropertyInfoTest.java   8132565 generic-all
 java/beans/Introspector/8132566/OverrideUserDefPropertyInfoTest.java 8132565 generic-all
-java/beans/PropertyEditor/TestBooleanClass.java                 8173082 generic-all
-java/beans/PropertyEditor/TestByteClass.java                    8173082 generic-all
-java/beans/PropertyEditor/TestColorClass.java                   8173082 generic-all
-java/beans/PropertyEditor/TestDoubleClass.java                  8173082 generic-all
-java/beans/PropertyEditor/TestFloatClass.java                   8173082 generic-all
-java/beans/PropertyEditor/TestFontClass.java                    8173082 generic-all
-java/beans/PropertyEditor/TestIntegerClass.java                 8173082 generic-all
-java/beans/PropertyEditor/TestLongClass.java                    8173082 generic-all
-java/beans/PropertyEditor/TestShortClass.java                   8173082 generic-all
-java/beans/PropertyEditor/TestStringClass.java                  8173082 generic-all
-java/beans/XMLEncoder/Test6570354.java                          8173082 generic-all
-java/beans/XMLDecoder/spec/TestObject.java                      8173082 macosx-all
-java/beans/XMLEncoder/Test4631471.java                          8173082 macosx-all
-java/beans/XMLEncoder/Test4652928.java                          8173082 macosx-all
-java/beans/XMLEncoder/Test4903007.java                          8173082 macosx-all
-java/beans/XMLEncoder/Test6437265.java                          8173082 macosx-all
-java/beans/XMLEncoder/Test6501431.java                          8173082 macosx-all
-java/beans/XMLEncoder/java_awt_BorderLayout.java                8173082 macosx-all
-java/beans/XMLEncoder/java_awt_CardLayout.java                  8173082 macosx-all
-java/beans/XMLEncoder/java_awt_GridBagLayout.java               8173082 macosx-all
-java/beans/XMLEncoder/javax_swing_BoxLayout.java                8173082 macosx-all
-java/beans/XMLEncoder/javax_swing_DefaultCellEditor.java        8173082 macosx-all
-java/beans/XMLEncoder/javax_swing_JButton.java                  8173082 macosx-all
-java/beans/XMLEncoder/javax_swing_JLayeredPane.java             8173082 macosx-all
-java/beans/XMLEncoder/javax_swing_JSplitPane.java               8173082 macosx-all
-java/beans/XMLEncoder/javax_swing_JTree.java                    8173082 macosx-all
-java/beans/XMLEncoder/javax_swing_OverlayLayout.java            8173082 macosx-all
-java/beans/XMLEncoder/javax_swing_border_TitledBorder.java      8173082 macosx-all
-java/beans/XMLEncoder/javax_swing_plaf_BorderUIResource_TitledBorderUIResource.java 8173082 macosx-all
 
 ############################################################################
 
--- a/test/java/lang/SecurityManager/CheckPackageAccess.java	Sat Jan 21 14:31:57 2017 -0800
+++ b/test/java/lang/SecurityManager/CheckPackageAccess.java	Mon Jan 23 07:34:11 2017 -0500
@@ -137,8 +137,7 @@
         // java.desktop module loaded by boot loader and has an openQual pkg
         // that is exported
         new Test("java.desktop", "java.applet", null, "sun.applet",
-                 "sun.awt", "com.sun.java.swing.plaf.windows",
-                 "javax.swing.plaf.basic"),
+                 "sun.awt", null, "javax.swing.plaf.basic"),
         // java.security.jgss module loaded by platform loader
         new Test("java.security.jgss", "org.ietf.jgss", null,
                  "sun.security.krb5.internal.crypto", "sun.security.krb5",
--- a/test/sun/security/provider/PolicyFile/TokenStore.java	Sat Jan 21 14:31:57 2017 -0800
+++ b/test/sun/security/provider/PolicyFile/TokenStore.java	Mon Jan 23 07:34:11 2017 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -250,10 +250,9 @@
         Enumeration perms = p.getPermissions(pd).elements();
         while (perms.hasMoreElements()) {
             Permission perm = (Permission)perms.nextElement();
-            if (!(perm instanceof AllPermission)) {
-                throw new SecurityException("expected AllPermission");
-            } else {
+            if (perm instanceof AllPermission) {
                 foundIt = true;
+                break;
             }
         }
         if (!foundIt) {