--- a/jdk/src/share/classes/java/security/IdentityScope.java Sat Feb 27 19:29:15 2010 +0000
+++ b/jdk/src/share/classes/java/security/IdentityScope.java Mon Mar 01 18:00:47 2010 +0000
@@ -129,7 +129,8 @@
/**
* Returns the system's identity scope.
*
- * @return the system's identity scope.
+ * @return the system's identity scope, or {@code null} if none has been
+ * set.
*
* @see #setSystemScope
*/
--- a/jdk/src/share/lib/security/java.security Sat Feb 27 19:29:15 2010 +0000
+++ b/jdk/src/share/lib/security/java.security Mon Mar 01 18:00:47 2010 +0000
@@ -118,11 +118,6 @@
keystore.type=jks
#
-# Class to instantiate as the system scope:
-#
-system.scope=sun.security.provider.IdentityDatabase
-
-#
# List of comma-separated packages that start with or equal this string
# will cause a security exception to be thrown when
# passed to checkPackageAccess unless the
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/security/IdentityScope/NoDefaultSystemScope.java Mon Mar 01 18:00:47 2010 +0000
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2010 Sun Microsystems, Inc. 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug 6921001
+ * @summary The default system identity scope is now null.
+ */
+import java.security.*;
+
+public class NoDefaultSystemScope {
+
+ public static void main(String args[]) throws Exception {
+ IdentityScope s = IdentityScope.getSystemScope();
+
+ if (s != null) {
+ throw new Exception("The default system scope should be null");
+ }
+ System.out.println("TEST PASSED");
+ }
+}
+