src/jdk.jconsole/share/classes/sun/tools/jconsole/inspector/XTree.java
Print this page
rev 10537 : 8055723[core]: Replace concat String to append in StringBuilder parameters
Contributed-by: Otavio Santana <otaviojava@java.net>
@@ -505,17 +505,17 @@
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) + ",");
+ 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() + "=" + entry.getValue() + ",");
+ sb.append(entry.getKey()).append('=').append(entry.getValue()).append(',');
}
String orderedKeyPropertyListString = sb.toString();
orderedKeyPropertyListString = orderedKeyPropertyListString.substring(
0, orderedKeyPropertyListString.length() - 1);
return orderedKeyPropertyListString;
@@ -620,11 +620,11 @@
// Compute the operation's tool tip text:
// "operationname(param1type,param2type,...)"
//
StringBuilder sb = new StringBuilder();
for (MBeanParameterInfo mbpi : mboi.getSignature()) {
- sb.append(mbpi.getType() + ",");
+ sb.append(mbpi.getType()).append(',');
}
String signature = sb.toString();
if (signature.length() > 0) {
// Remove the trailing ','
//