diff --git a/src/share/classes/java/security/IdentityScope.java b/src/share/classes/java/security/IdentityScope.java index 0ebc396fa78a578f6efa43f986f5ffa123561ca7..7ed921568952a47a23d595799f7c3a988786b0bc 100644 --- a/src/share/classes/java/security/IdentityScope.java +++ b/src/share/classes/java/security/IdentityScope.java @@ -129,7 +129,8 @@ class IdentityScope extends Identity { /** * 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 */ diff --git a/src/share/lib/security/java.security b/src/share/lib/security/java.security index 7d386b715ae0616d9567612a4b3337acee1c256e..1c9404f60af4caea46f99a296adcc054ac61bd4a 100644 --- a/src/share/lib/security/java.security +++ b/src/share/lib/security/java.security @@ -117,11 +117,6 @@ policy.ignoreIdentityScope=false # 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 diff --git a/test/java/security/IdentityScope/NoDefaultSystemScope.java b/test/java/security/IdentityScope/NoDefaultSystemScope.java new file mode 100644 index 0000000000000000000000000000000000000000..f2e6d5a9f50393e85fcec1f6f6d014607b6ca224 --- /dev/null +++ b/test/java/security/IdentityScope/NoDefaultSystemScope.java @@ -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"); + } +} +