src/java.security.acl/share/classes/sun/security/acl/AclEntryImpl.java

Print this page
rev 10521 : 8055723[core]: Replace concat String to append in StringBuilder parameters
Contributed-by: Otavio Santana <otaviojava@java.net>

*** 136,163 **** /** * Return a string representation of the contents of the ACL entry. */ public String toString() { ! StringBuffer s = new StringBuffer(); ! if (negative) ! s.append("-"); ! else ! s.append("+"); ! if (user instanceof Group) ! s.append("Group."); ! else ! s.append("User."); ! s.append(user + "="); Enumeration<Permission> e = permissions(); ! while(e.hasMoreElements()) { Permission p = e.nextElement(); ! s.append(p); ! if (e.hasMoreElements()) ! s.append(","); } ! return new String(s); } /** * Clones an AclEntry. */ --- 136,167 ---- /** * Return a string representation of the contents of the ACL entry. */ public String toString() { ! StringBuffer sb = new StringBuffer(); ! if (negative) { ! sb.append('-'); ! } else { ! sb.append('+'); ! } ! if (user instanceof Group) { ! sb.append("Group."); ! } else { ! sb.append("User."); ! } ! sb.append(user).append('='); ! Enumeration<Permission> e = permissions(); ! while (e.hasMoreElements()) { Permission p = e.nextElement(); ! sb.append(p); ! if (e.hasMoreElements()) { ! sb.append(','); ! } } ! return sb.toString(); } /** * Clones an AclEntry. */