< prev index next >

src/java.base/share/classes/java/nio/file/LinkPermission.java

Print this page
rev 52979 : 8215281: Use String.isEmpty() when applicable in java.base
Reviewed-by: TBD


  87     public LinkPermission(String name) {
  88         super(name);
  89         checkName(name);
  90     }
  91 
  92     /**
  93      * Constructs a {@code LinkPermission} with the specified name.
  94      *
  95      * @param   name
  96      *          the name of the permission; must be "hard" or "symbolic".
  97      * @param   actions
  98      *          the actions for the permission; must be the empty string or
  99      *          {@code null}
 100      *
 101      * @throws  IllegalArgumentException
 102      *          if name is empty or invalid, or actions is a non-empty string
 103      */
 104     public LinkPermission(String name, String actions) {
 105         super(name);
 106         checkName(name);
 107         if (actions != null && actions.length() > 0) {
 108             throw new IllegalArgumentException("actions: " + actions);
 109         }
 110     }
 111 }


  87     public LinkPermission(String name) {
  88         super(name);
  89         checkName(name);
  90     }
  91 
  92     /**
  93      * Constructs a {@code LinkPermission} with the specified name.
  94      *
  95      * @param   name
  96      *          the name of the permission; must be "hard" or "symbolic".
  97      * @param   actions
  98      *          the actions for the permission; must be the empty string or
  99      *          {@code null}
 100      *
 101      * @throws  IllegalArgumentException
 102      *          if name is empty or invalid, or actions is a non-empty string
 103      */
 104     public LinkPermission(String name, String actions) {
 105         super(name);
 106         checkName(name);
 107         if (actions != null && !actions.isEmpty()) {
 108             throw new IllegalArgumentException("actions: " + actions);
 109         }
 110     }
 111 }
< prev index next >