< prev index next >

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

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

*** 220,230 **** * * @return information about this Permission. */ public String toString() { String actions = getActions(); ! if ((actions == null) || (actions.length() == 0)) { // OPTIONAL return "(\"" + getClass().getName() + "\" \"" + name + "\")"; } else { return "(\"" + getClass().getName() + "\" \"" + name + "\" \"" + actions + "\")"; } --- 220,230 ---- * * @return information about this Permission. */ public String toString() { String actions = getActions(); ! if (actions == null || actions.isEmpty()) { // OPTIONAL return "(\"" + getClass().getName() + "\" \"" + name + "\")"; } else { return "(\"" + getClass().getName() + "\" \"" + name + "\" \"" + actions + "\")"; }
< prev index next >