Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Input stream mark and reset do not preserve endianness #63

Open
thomas-breining opened this issue Sep 1, 2019 · 1 comment
Open

Input stream mark and reset do not preserve endianness #63

thomas-breining opened this issue Sep 1, 2019 · 1 comment

Comments

@thomas-breining
Copy link

When an input stream is marked, the underlying byteBuffer is duplicated using the java.nio.ByteBuffer.duplicate() function which does not replicate the buffer byte order.

This breaks the processing of little endian user exception replies which peeks at the exception id and resets the input stream with the wrong byte order.

String exceptionRepoId = peekUserExceptionId(inputObject);

@thomas-breining
Copy link
Author

Hi,
I wrote a small unit test that shows the issue with a potential fix here https://github.com/thomas-breining/orb/commit/ef98f2a4f31d0273f7d5b4ff48f9e4b29352bf04.
Please don't hesitate to let me know if and how I can help further.
Thanks.

russgold pushed a commit that referenced this issue Apr 27, 2020
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

No branches or pull requests

1 participant