File tree Expand file tree Collapse file tree
src/test/java/org/apache/commons/codec/binary Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ public void testCodec105() throws IOException {
9191 */
9292 @ Test
9393 public void testCodec101 () throws Exception {
94- final byte [] codec101 = StringUtils .getBytesUtf8 (Base64TestData .CODEC_101_MULTIPLE_OF_3 );
94+ final byte [] codec101 = StringUtils .getBytesUtf8 (Base64TestData .CODEC_101_INPUT_LENGTH_IS_MULTIPLE_OF_3 );
9595 final ByteArrayInputStream bais = new ByteArrayInputStream (codec101 );
9696 try (final Base64InputStream in = new Base64InputStream (bais )) {
9797 final byte [] result = new byte [8192 ];
@@ -120,7 +120,7 @@ public void testCodec101() throws Exception {
120120 */
121121 @ Test
122122 public void testInputStreamReader () throws Exception {
123- final byte [] codec101 = StringUtils .getBytesUtf8 (Base64TestData .CODEC_101_MULTIPLE_OF_3 );
123+ final byte [] codec101 = StringUtils .getBytesUtf8 (Base64TestData .CODEC_101_INPUT_LENGTH_IS_MULTIPLE_OF_3 );
124124 final ByteArrayInputStream bais = new ByteArrayInputStream (codec101 );
125125 final Base64InputStream in = new Base64InputStream (bais );
126126 final InputStreamReader isr = new InputStreamReader (in );
Original file line number Diff line number Diff line change 2828 */
2929public class Base64TestData {
3030
31- public static final String CODEC_101_MULTIPLE_OF_3 = "124" ;
31+ /**
32+ * A valid base 64 encoding that has a length that is a multiple of 3.
33+ * @see <a href="https://issues.apache.org/jira/browse/CODEC-101">Codec 101</a>
34+ */
35+ public static final String CODEC_101_INPUT_LENGTH_IS_MULTIPLE_OF_3 = "124" ;
3236
3337 public static final String CODEC_98_NPE
3438 = "YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXpBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWjAxMjM" ;
You can’t perform that action at this time.
0 commit comments