Append the final "]" using the StringBuilder.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2882 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -78,11 +78,14 @@ public class LogBuilder
|
|||||||
*/
|
*/
|
||||||
@Override public String toString ()
|
@Override public String toString ()
|
||||||
{
|
{
|
||||||
String log = _log.toString();
|
|
||||||
if (_hasArgs) {
|
if (_hasArgs) {
|
||||||
log += "]";
|
try {
|
||||||
|
return _log.append(']').toString();
|
||||||
|
} finally {
|
||||||
|
_log.setLength(_log.length() - 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return log;
|
return _log.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected boolean _hasArgs;
|
protected boolean _hasArgs;
|
||||||
|
|||||||
Reference in New Issue
Block a user