src/java.management/share/classes/javax/management/relation/Role.java

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

*** 224,244 **** * Returns a string describing the role. * * @return the description of the role. */ public String toString() { ! StringBuilder result = new StringBuilder(); ! result.append("role name: " + name + "; role value: "); ! for (Iterator<ObjectName> objNameIter = objectNameList.iterator(); ! objNameIter.hasNext();) { ObjectName currObjName = objNameIter.next(); ! result.append(currObjName.toString()); if (objNameIter.hasNext()) { ! result.append(", "); } } ! return result.toString(); } // // Misc // --- 224,244 ---- * Returns a string describing the role. * * @return the description of the role. */ public String toString() { ! StringBuilder sb = new StringBuilder(); ! sb.append("role name: ").append(name).append("; role value: "); ! for (Iterator<ObjectName> objNameIter = objectNameList.iterator(); objNameIter ! .hasNext();) { ObjectName currObjName = objNameIter.next(); ! sb.append(currObjName); if (objNameIter.hasNext()) { ! sb.append(", "); } } ! return sb.toString(); } // // Misc //