git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@881274 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Bosanac Dejan 2009-11-17 13:26:16 +00:00
parent a55efe952c
commit 1466d6cc3a
1 changed files with 8 additions and 3 deletions

View File

@ -262,23 +262,28 @@ public final class IntrospectionSupport {
boolean first = true;
for (Iterator iter = entrySet.iterator(); iter.hasNext();) {
Map.Entry entry = (Map.Entry)iter.next();
Object value = entry.getValue();
Object key = entry.getKey();
if (first) {
first = false;
} else {
buffer.append(", ");
}
buffer.append(entry.getKey());
buffer.append(key);
buffer.append(" = ");
appendToString(buffer, entry.getValue());
appendToString(buffer, key, value);
}
buffer.append("}");
return buffer.toString();
}
protected static void appendToString(StringBuffer buffer, Object value) {
protected static void appendToString(StringBuffer buffer, Object key, Object value) {
if (value instanceof ActiveMQDestination) {
ActiveMQDestination destination = (ActiveMQDestination)value;
buffer.append(destination.getQualifiedName());
} else if (key.toString().contains("password")){
buffer.append("*****");
} else {
buffer.append(value);
}