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 2323import static org .junit .Assert .fail ;
2424
2525import java .io .UnsupportedEncodingException ;
26+ import java .nio .ByteBuffer ;
2627import java .nio .charset .Charset ;
2728import java .nio .charset .UnsupportedCharsetException ;
2829import java .util .Arrays ;
@@ -199,10 +200,14 @@ public void testDecodeBadCharacterPos1() {
199200
200201 @ Test
201202 public void testDecodeByteArrayEmpty () throws DecoderException {
202- assertTrue (Arrays .equals (new byte [0 ], Hex .decodeHex (new char [0 ])));
203203 assertTrue (Arrays .equals (new byte [0 ], new Hex ().decode (new byte [0 ])));
204204 }
205205
206+ @ Test
207+ public void testDecodeCharArrayEmpty () throws DecoderException {
208+ assertTrue (Arrays .equals (new byte [0 ], Hex .decodeHex (new char [0 ])));
209+ }
210+
206211 @ Test
207212 public void testDecodeByteArrayOddCharacters () {
208213 try {
You can’t perform that action at this time.
0 commit comments