Skip to content

Commit b4eba75

Browse files
committed
Improve toString() for debugging.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/codec/trunk@1465178 13f79535-47bb-0310-9956-ffa450edef68
1 parent 63687e7 commit b4eba75

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

src/main/java/org/apache/commons/codec/binary/BaseNCodec.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717

1818
package org.apache.commons.codec.binary;
1919

20+
import java.util.Arrays;
21+
2022
import org.apache.commons.codec.BinaryDecoder;
2123
import org.apache.commons.codec.BinaryEncoder;
2224
import org.apache.commons.codec.DecoderException;
@@ -98,9 +100,9 @@ static class Context {
98100
@SuppressWarnings("boxing") // OK to ignore boxing here
99101
@Override
100102
public String toString() {
101-
return String.format("%s[buffer=%s, currentLinePos=%s, eof=%s, ibitWorkArea=%s, lbitWorkArea=%s, " +
102-
"modulus=%s, pos=%s, readPos=%s]", this.getClass().getSimpleName(), buffer, currentLinePos, eof,
103-
ibitWorkArea, lbitWorkArea, modulus, pos, readPos);
103+
return String.format("%s[buffer=%s, currentLinePos=%s, eof=%s, ibitWorkArea=%s, lbitWorkArea=%s, "
104+
+ "modulus=%s, pos=%s, readPos=%s]", this.getClass().getSimpleName(), Arrays.toString(buffer),
105+
currentLinePos, eof, ibitWorkArea, lbitWorkArea, modulus, pos, readPos);
104106
}
105107
}
106108

0 commit comments

Comments
 (0)