src/java.base/share/classes/java/util/PropertyPermission.java
changeset 58288 48e480e56aad
parent 58242 94bb65cb37d3
child 58659 4113f16d5109
equal deleted inserted replaced
58287:a7f16447085e 58288:48e480e56aad
    52  * a list of one or more comma-separated keywords. The possible keywords are
    52  * a list of one or more comma-separated keywords. The possible keywords are
    53  * "read" and "write". Their meaning is defined as follows:
    53  * "read" and "write". Their meaning is defined as follows:
    54  *
    54  *
    55  * <DL>
    55  * <DL>
    56  *    <DT> read
    56  *    <DT> read
    57  *    <DD> read permission. Allows <code>System.getProperty</code> to
    57  *    <DD> read permission. Allows {@code System.getProperty} to
    58  *         be called.
    58  *         be called.
    59  *    <DT> write
    59  *    <DT> write
    60  *    <DD> write permission. Allows <code>System.setProperty</code> to
    60  *    <DD> write permission. Allows {@code System.setProperty} to
    61  *         be called.
    61  *         be called.
    62  * </DL>
    62  * </DL>
    63  * <P>
    63  * <P>
    64  * The actions string is converted to lowercase before processing.
    64  * The actions string is converted to lowercase before processing.
    65  * <P>
    65  * <P>
   147      * "read" and "write".
   147      * "read" and "write".
   148      *
   148      *
   149      * @param name the name of the PropertyPermission.
   149      * @param name the name of the PropertyPermission.
   150      * @param actions the actions string.
   150      * @param actions the actions string.
   151      *
   151      *
   152      * @throws NullPointerException if <code>name</code> is <code>null</code>.
   152      * @throws NullPointerException if {@code name} is {@code null}.
   153      * @throws IllegalArgumentException if <code>name</code> is empty or if
   153      * @throws IllegalArgumentException if {@code name} is empty or if
   154      * <code>actions</code> is invalid.
   154      * {@code actions} is invalid.
   155      */
   155      */
   156     public PropertyPermission(String name, String actions) {
   156     public PropertyPermission(String name, String actions) {
   157         super(name,actions);
   157         super(name,actions);
   158         init(getMask(actions));
   158         init(getMask(actions));
   159     }
   159     }
   221     }
   221     }
   222 
   222 
   223     /**
   223     /**
   224      * Returns the hash code value for this object.
   224      * Returns the hash code value for this object.
   225      * The hash code used is the hash code of this permissions name, that is,
   225      * The hash code used is the hash code of this permissions name, that is,
   226      * <code>getName().hashCode()</code>, where <code>getName</code> is
   226      * {@code getName().hashCode()}, where {@code getName} is
   227      * from the Permission superclass.
   227      * from the Permission superclass.
   228      *
   228      *
   229      * @return a hash code value for this object.
   229      * @return a hash code value for this object.
   230      */
   230      */
   231     @Override
   231     @Override
   348 
   348 
   349     /**
   349     /**
   350      * Returns the "canonical string representation" of the actions.
   350      * Returns the "canonical string representation" of the actions.
   351      * That is, this method always returns present actions in the following order:
   351      * That is, this method always returns present actions in the following order:
   352      * read, write. For example, if this PropertyPermission object
   352      * read, write. For example, if this PropertyPermission object
   353      * allows both write and read actions, a call to <code>getActions</code>
   353      * allows both write and read actions, a call to {@code getActions}
   354      * will return the string "read,write".
   354      * will return the string "read,write".
   355      *
   355      *
   356      * @return the canonical string representation of the actions.
   356      * @return the canonical string representation of the actions.
   357      */
   357      */
   358     @Override
   358     @Override