KeyChainGroup: Small optimization in toString().

This commit is contained in:
Andreas Schildbach 2016-03-03 15:03:48 +01:00
parent f70086ae64
commit b024f6e571

View File

@ -795,11 +795,8 @@ public class KeyChainGroup implements KeyBag {
for (ECKey key : keys)
key.formatKeyWithAddress(includePrivateKeys, builder, params);
}
List<String> chainStrs = Lists.newLinkedList();
for (DeterministicKeyChain chain : chains) {
chainStrs.add(chain.toString(includePrivateKeys, params));
}
builder.append(Joiner.on('\n').join(chainStrs));
for (DeterministicKeyChain chain : chains)
builder.append(chain.toString(includePrivateKeys, params)).append('\n');
return builder.toString();
}