Skip to content

Conversation

@danburkert
Copy link
Contributor

The conversions for ByteBuffer -> byte array and seq-of ByteBuffer -> ByteBuffer incorrectly modifies the buffer's position. This fixes the issue and adds a test that fails without the fix.

@danburkert
Copy link
Contributor Author

9cac76e fixes an issue where the conversion of ByteBuffer -> (seq-of ByteBuffer) does not respect the position of the original buffer. Also, conversion behaves better when passing a chunk-size <= 0 (just returns an empty seq).

consistent import formatting

fix ByteBuffer -> (seq-of ByteBuffer) position bug

remove accidental file

cleanup tests
@danburkert
Copy link
Contributor Author

rebased. I had to change the type hint on to-byte-array to get around a compiler exception about not being able to resolve bytes.

@ztellman
Copy link
Collaborator

Looks good, thanks.

ztellman added a commit that referenced this pull request Jul 14, 2013
Fix a bug in converting ByteBuffers
@ztellman ztellman merged commit 007f772 into clj-commons:master Jul 14, 2013
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.

2 participants