src/java.base/share/classes/java/security/BasicPermission.java
changeset 58659 4113f16d5109
parent 58242 94bb65cb37d3
child 58679 9c3209ff7550
equal deleted inserted replaced
58658:55866aa5fb54 58659:4113f16d5109
   347      * Adds a permission to the BasicPermissions. The key for the hash is
   347      * Adds a permission to the BasicPermissions. The key for the hash is
   348      * permission.path.
   348      * permission.path.
   349      *
   349      *
   350      * @param permission the Permission object to add.
   350      * @param permission the Permission object to add.
   351      *
   351      *
   352      * @throws    IllegalArgumentException - if the permission is not a
   352      * @throws    IllegalArgumentException   if the permission is not a
   353      *                                       BasicPermission, or if
   353      *                                       BasicPermission, or if
   354      *                                       the permission is not of the
   354      *                                       the permission is not of the
   355      *                                       same Class as the other
   355      *                                       same Class as the other
   356      *                                       permissions in this collection.
   356      *                                       permissions in this collection.
   357      *
   357      *
   358      * @throws    SecurityException - if this BasicPermissionCollection object
   358      * @throws    SecurityException   if this BasicPermissionCollection object
   359      *                                has been marked readonly
   359      *                                has been marked readonly
   360      */
   360      */
   361     @Override
   361     @Override
   362     public void add(Permission permission) {
   362     public void add(Permission permission) {
   363         if (! (permission instanceof BasicPermission))
   363         if (! (permission instanceof BasicPermission))