Author: borges
Date: 2012-02-23 04:38:47 -0500 (Thu, 23 Feb 2012)
New Revision: 12172
Modified:
trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/Topology.java
Log:
Use StringBuilder, fixing findbugs warning
Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/Topology.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/Topology.java 2012-02-23
09:38:28 UTC (rev 12171)
+++ trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/Topology.java 2012-02-23
09:38:47 UTC (rev 12172)
@@ -485,18 +485,17 @@
public synchronized String describe(final String text)
{
-
- String desc = text + "topology on " + this + ":\n";
+ StringBuilder desc = new StringBuilder(text + "topology on " + this +
":\n");
for (Entry<String, TopologyMember> entry : new HashMap<String,
TopologyMember>(topology).entrySet())
{
- desc += "\t" + entry.getKey() + " => " + entry.getValue()
+ "\n";
+ desc.append("\t" + entry.getKey() + " => " +
entry.getValue() + "\n");
}
- desc += "\t" + "nodes=" + nodes() + "\t" +
"members=" + members();
+ desc.append("\t" + "nodes=" + nodes() + "\t" +
"members=" + members());
if (topology.isEmpty())
{
- desc += "\tEmpty";
+ desc.append("\tEmpty");
}
- return desc;
+ return desc.toString();
}
public int members()
Show replies by date