commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [commons-codec] garydgregory commented on a change in pull request #23: CODEC-259: fixed ByteBuffer issues and updated tests
Date Mon, 15 Jul 2019 00:16:55 GMT
garydgregory commented on a change in pull request #23: CODEC-259: fixed ByteBuffer issues
and updated tests
URL: https://github.com/apache/commons-codec/pull/23#discussion_r303268214
 
 

 ##########
 File path: src/test/java/org/apache/commons/codec/binary/HexTest.java
 ##########
 @@ -227,18 +227,19 @@ public void testDecodeByteArrayOddCharacters() {
 
     @Test
     public void testDecodeByteBufferEmpty() throws DecoderException {
-        assertTrue(Arrays.equals(new byte[0], new Hex().decode(ByteBuffer.allocate(0))));
 
 Review comment:
   I would prefer to add tests instead of updating each call to `allocate` with a call to
`allocateDirect`. This is something that could be done either with subclasses (one for allocate,
one for allocateDirect) or with parameterizing the test with lambdas.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message