src/share/classes/java/security/BasicPermission.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 1997, 2012, 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 * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 1997, 2013, 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 * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 122,133 **** * "setFactory", * "print.queueJob", or "topLevelWindow", etc. * * @param name the name of the BasicPermission. * ! * @throws NullPointerException if <code>name</code> is <code>null</code>. ! * @throws IllegalArgumentException if <code>name</code> is empty. */ public BasicPermission(String name) { super(name); init(name); } --- 122,133 ---- * "setFactory", * "print.queueJob", or "topLevelWindow", etc. * * @param name the name of the BasicPermission. * ! * @throws NullPointerException if {@code name} is {@code null}. ! * @throws IllegalArgumentException if {@code name} is empty. */ public BasicPermission(String name) { super(name); init(name); }
*** 139,150 **** * actions String is currently unused. * * @param name the name of the BasicPermission. * @param actions ignored. * ! * @throws NullPointerException if <code>name</code> is <code>null</code>. ! * @throws IllegalArgumentException if <code>name</code> is empty. */ public BasicPermission(String name, String actions) { super(name); init(name); } --- 139,150 ---- * actions String is currently unused. * * @param name the name of the BasicPermission. * @param actions ignored. * ! * @throws NullPointerException if {@code name} is {@code null}. ! * @throws IllegalArgumentException if {@code name} is empty. */ public BasicPermission(String name, String actions) { super(name); init(name); }
*** 215,225 **** /** * Returns the hash code value for this object. * The hash code used is the hash code of the name, that is, ! * <code>getName().hashCode()</code>, where <code>getName</code> is * from the Permission superclass. * * @return a hash code value for this object. */ public int hashCode() { --- 215,225 ---- /** * Returns the hash code value for this object. * The hash code used is the hash code of the name, that is, ! * {@code getName().hashCode()}, where {@code getName} is * from the Permission superclass. * * @return a hash code value for this object. */ public int hashCode() {
*** 241,251 **** * Returns a new PermissionCollection object for storing BasicPermission * objects. * * <p>BasicPermission objects must be stored in a manner that allows them * to be inserted in any order, but that also enables the ! * PermissionCollection <code>implies</code> method * to be implemented in an efficient (and consistent) manner. * * @return a new PermissionCollection object suitable for * storing BasicPermissions. */ --- 241,251 ---- * Returns a new PermissionCollection object for storing BasicPermission * objects. * * <p>BasicPermission objects must be stored in a manner that allows them * to be inserted in any order, but that also enables the ! * PermissionCollection {@code implies} method * to be implemented in an efficient (and consistent) manner. * * @return a new PermissionCollection object suitable for * storing BasicPermissions. */
*** 310,320 **** * Not serialized; see serialization section at end of class. */ private transient Map<String, Permission> perms; /** ! * This is set to <code>true</code> if this BasicPermissionCollection * contains a BasicPermission with '*' as its permission name. * * @see #serialPersistentFields */ private boolean all_allowed; --- 310,320 ---- * Not serialized; see serialization section at end of class. */ private transient Map<String, Permission> perms; /** ! * This is set to {@code true} if this BasicPermissionCollection * contains a BasicPermission with '*' as its permission name. * * @see #serialPersistentFields */ private boolean all_allowed;
*** 475,485 **** * The BasicPermissions in this BasicPermissionCollection. * All BasicPermissions in the collection must belong to the same class. * The Hashtable is indexed by the BasicPermission name; the value * of the Hashtable entry is the permission. * @serialField all_allowed boolean ! * This is set to <code>true</code> if this BasicPermissionCollection * contains a BasicPermission with '*' as its permission name. * @serialField permClass java.lang.Class * The class to which all BasicPermissions in this * BasicPermissionCollection belongs. */ --- 475,485 ---- * The BasicPermissions in this BasicPermissionCollection. * All BasicPermissions in the collection must belong to the same class. * The Hashtable is indexed by the BasicPermission name; the value * of the Hashtable entry is the permission. * @serialField all_allowed boolean ! * This is set to {@code true} if this BasicPermissionCollection * contains a BasicPermission with '*' as its permission name. * @serialField permClass java.lang.Class * The class to which all BasicPermissions in this * BasicPermissionCollection belongs. */