Skip to content

Commit 5c06c6f

Browse files
committed
No point in using getBytes() on "abc" - just code the bytes directly.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/codec/trunk@886286 13f79535-47bb-0310-9956-ffa450edef68
1 parent 31c3079 commit 5c06c6f

1 file changed

Lines changed: 1 addition & 9 deletions

File tree

src/test/org/apache/commons/codec/binary/StringUtilsTest.java

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,10 @@
3131
*/
3232
public class StringUtilsTest extends TestCase {
3333

34-
private static byte[] BYTES_FIXTURE;
34+
private static final byte[] BYTES_FIXTURE = {'a','b','c'};
3535

3636
private static final String STRING_FIXTURE = "ABC";
3737

38-
{
39-
try {
40-
BYTES_FIXTURE = "abc".getBytes("US-ASCII");
41-
} catch (UnsupportedEncodingException e) {
42-
throw new IllegalArgumentException(e.toString());
43-
}
44-
}
45-
4638
/**
4739
* We could make the constructor private but there does not seem to be a point to jumping through extra code hoops
4840
* to restrict instantiation right now.

0 commit comments

Comments
 (0)