Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Reduce vertical whitespace.
  • Loading branch information
garydgregory authored Jun 18, 2026
commit f21f256485de6f8d540a5bf357322726d3ccf5cf
4 changes: 0 additions & 4 deletions src/test/java/org/apache/commons/codec/binary/Base64Test.java
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,6 @@ void testCustomEncodingAlphabetAllowsNonAsciiBytes() {
final Base64 base64 = Base64.builder().setEncodeTable(encodeTable).get();
final byte[] data = { 0 };
final byte[] encoded = base64.encode(data);

assertArrayEquals(new byte[] { (byte) 0x80, (byte) 0x80 }, encoded);
assertTrue(base64.isInAlphabet(encoded, false));
assertArrayEquals(data, base64.decode(encoded));
Expand All @@ -548,15 +547,13 @@ void testCustomEncodingAlphabetAllowsPaddingByteWhenPaddingChanges() {
encodeTable[0] = '=';
final Base64 base64 = Base64.builder().setEncodeTable(encodeTable).setPadding((byte) '.').get();
final byte[] data = { 0 };

assertArrayEquals(data, base64.decode(base64.encode(data)));
}

@Test
void testCustomEncodingAlphabetRejectsConfiguredPaddingByte() {
final byte[] encodeTable = STANDARD_ENCODE_TABLE.clone();
encodeTable[0] = '=';

assertThrows(IllegalArgumentException.class, () -> Base64.builder().setEncodeTable(encodeTable).get());
assertThrows(IllegalArgumentException.class, () -> Base64.builder().setPadding((byte) 'A').get());
}
Expand All @@ -565,7 +562,6 @@ void testCustomEncodingAlphabetRejectsConfiguredPaddingByte() {
void testCustomEncodingAlphabetRejectsDuplicateEntries() {
final byte[] encodeTable = STANDARD_ENCODE_TABLE.clone();
encodeTable[1] = encodeTable[0];

assertThrows(IllegalArgumentException.class, () -> Base64.builder().setEncodeTable(encodeTable));
}

Expand Down
Loading