< prev index next >

src/java.base/share/classes/java/security/Policy.java

Print this page
rev 56290 : 8230648: Replace @exception tag with @throws in java.base
Summary: Minor coding style update of javadoc tag in any file in java.base
Reviewed-by: prappo, lancea


 820 
 821         @java.io.Serial
 822         private static final long serialVersionUID = -8492269157353014774L;
 823 
 824         private Permissions perms;
 825 
 826         /**
 827          * Create a read-only empty PermissionCollection object.
 828          */
 829         public UnsupportedEmptyCollection() {
 830             this.perms = new Permissions();
 831             perms.setReadOnly();
 832         }
 833 
 834         /**
 835          * Adds a permission object to the current collection of permission
 836          * objects.
 837          *
 838          * @param permission the Permission object to add.
 839          *
 840          * @exception SecurityException - if this PermissionCollection object
 841          *                                has been marked readonly
 842          */
 843         @Override public void add(Permission permission) {
 844             perms.add(permission);
 845         }
 846 
 847         /**
 848          * Checks to see if the specified permission is implied by the
 849          * collection of Permission objects held in this PermissionCollection.
 850          *
 851          * @param permission the Permission object to compare.
 852          *
 853          * @return true if "permission" is implied by the permissions in
 854          * the collection, false if not.
 855          */
 856         @Override public boolean implies(Permission permission) {
 857             return perms.implies(permission);
 858         }
 859 
 860         /**


 820 
 821         @java.io.Serial
 822         private static final long serialVersionUID = -8492269157353014774L;
 823 
 824         private Permissions perms;
 825 
 826         /**
 827          * Create a read-only empty PermissionCollection object.
 828          */
 829         public UnsupportedEmptyCollection() {
 830             this.perms = new Permissions();
 831             perms.setReadOnly();
 832         }
 833 
 834         /**
 835          * Adds a permission object to the current collection of permission
 836          * objects.
 837          *
 838          * @param permission the Permission object to add.
 839          *
 840          * @throws    SecurityException - if this PermissionCollection object
 841          *                                has been marked readonly
 842          */
 843         @Override public void add(Permission permission) {
 844             perms.add(permission);
 845         }
 846 
 847         /**
 848          * Checks to see if the specified permission is implied by the
 849          * collection of Permission objects held in this PermissionCollection.
 850          *
 851          * @param permission the Permission object to compare.
 852          *
 853          * @return true if "permission" is implied by the permissions in
 854          * the collection, false if not.
 855          */
 856         @Override public boolean implies(Permission permission) {
 857             return perms.implies(permission);
 858         }
 859 
 860         /**
< prev index next >