Skip to content

CODEC-259: fixed ByteBuffer issues and updated tests#23

Closed
Megaprog wants to merge 1 commit into
apache:masterfrom
Megaprog:CODEC-259-ByteBuffer-fix
Closed

CODEC-259: fixed ByteBuffer issues and updated tests#23
Megaprog wants to merge 1 commit into
apache:masterfrom
Megaprog:CODEC-259-ByteBuffer-fix

Conversation

@Megaprog

Copy link
Copy Markdown

#CODEC-259

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.05%) to 92.717% when pulling 078edbd on Megaprog:CODEC-259-ByteBuffer-fix into 30e5768 on apache:master.

1 similar comment
@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.05%) to 92.717% when pulling 078edbd on Megaprog:CODEC-259-ByteBuffer-fix into 30e5768 on apache:master.


@Test
public void testDecodeByteBufferEmpty() throws DecoderException {
assertTrue(Arrays.equals(new byte[0], new Hex().decode(ByteBuffer.allocate(0))));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sorry but have no time for that

@asfgit asfgit closed this in 3fd5dcd Jul 19, 2019

@garydgregory garydgregory left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please debase on master, the main and test code are different now.

omosteven pushed a commit to omosteven/commons-codec-lab-work that referenced this pull request Jan 8, 2025
org.apache.commons.codec.binary.Hex. Closes apache#23.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants