-
Notifications
You must be signed in to change notification settings - Fork 406
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
ClassCastException in Unsafe buffer wrapping a HeapByteBufferR #66
Comments
What JDK and by what means have you created the ByteBuffer? |
Also what version of Agrona are you using? |
The problem is that the buffer that is been passed to UnsafeBuffer is a readonly one. HeapByteBufferR will return false when calling |
@mikeb01 I just noticed this. Seems ready-only heap buffers give the wrong answers to |
…nly buffer then the exception is more informative until a better solution is found. Issue #66.
This should now be consistent across direct and heap buffers. |
Hi,
I'm getting a class cast exception using an UnsafeBuffer. Looks like HeapByteBufferR doesn't implement DirectBuffer and is causing problems. Here's the pertinent stack trace fragments:
Thanks,
Robert
The text was updated successfully, but these errors were encountered: