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:
[email protected]
With regards,
Apache Git Services