< 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
*** 102,111 ****
* if name is empty or invalid, or actions is a non-empty string
*/
public LinkPermission(String name, String actions) {
super(name);
checkName(name);
! if (actions != null && actions.length() > 0) {
throw new IllegalArgumentException("actions: " + actions);
}
}
}
--- 102,111 ----
* if name is empty or invalid, or actions is a non-empty string
*/
public LinkPermission(String name, String actions) {
super(name);
checkName(name);
! if (actions != null && !actions.isEmpty()) {
throw new IllegalArgumentException("actions: " + actions);
}
}
}
< prev index next >