src/jdk.jconsole/share/classes/sun/tools/jconsole/inspector/XTree.java

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

*** 505,521 **** StringBuilder sb = new StringBuilder(); // Add the key/value pairs to the buffer following the // key order defined by the "orderedKeyPropertyList" for (String key : orderedKeyPropertyList) { if (map.containsKey(key)) { ! sb.append(key + "=" + map.get(key) + ","); map.remove(key); } } // Add the remaining key/value pairs to the buffer for (Map.Entry<String, String> entry : map.entrySet()) { ! sb.append(entry.getKey() + "=" + entry.getValue() + ","); } String orderedKeyPropertyListString = sb.toString(); orderedKeyPropertyListString = orderedKeyPropertyListString.substring( 0, orderedKeyPropertyListString.length() - 1); return orderedKeyPropertyListString; --- 505,521 ---- StringBuilder sb = new StringBuilder(); // Add the key/value pairs to the buffer following the // key order defined by the "orderedKeyPropertyList" for (String key : orderedKeyPropertyList) { if (map.containsKey(key)) { ! sb.append(key).append('=').append(map.get(key)).append(','); map.remove(key); } } // Add the remaining key/value pairs to the buffer for (Map.Entry<String, String> entry : map.entrySet()) { ! sb.append(entry.getKey()).append('=').append(entry.getValue()).append(','); } String orderedKeyPropertyListString = sb.toString(); orderedKeyPropertyListString = orderedKeyPropertyListString.substring( 0, orderedKeyPropertyListString.length() - 1); return orderedKeyPropertyListString;
*** 620,630 **** // Compute the operation's tool tip text: // "operationname(param1type,param2type,...)" // StringBuilder sb = new StringBuilder(); for (MBeanParameterInfo mbpi : mboi.getSignature()) { ! sb.append(mbpi.getType() + ","); } String signature = sb.toString(); if (signature.length() > 0) { // Remove the trailing ',' // --- 620,630 ---- // Compute the operation's tool tip text: // "operationname(param1type,param2type,...)" // StringBuilder sb = new StringBuilder(); for (MBeanParameterInfo mbpi : mboi.getSignature()) { ! sb.append(mbpi.getType()).append(','); } String signature = sb.toString(); if (signature.length() > 0) { // Remove the trailing ',' //