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

Use Unsafe to obtain location of direct Buffer address field #128

Merged
merged 1 commit into from
Jun 18, 2021

Conversation

martint
Copy link
Member

@martint martint commented Jun 16, 2021

Java 16 removed reflective access to internal fields in the java.nio.Buffer class
to be able to operate on direct byte buffers, so resort to Unsafe as a stop gap.

We'll revisit this later, possibly when the Foreign-Memory Access API
becomes final.

Fixes #125

@martint martint force-pushed the directbuffer-take-2 branch 2 times, most recently from fae442f to 3e4ad51 Compare June 16, 2021 16:54
@martint martint requested a review from dain June 16, 2021 16:57
Java 16 removed reflective access to internal fields in the java.nio.Buffer class
to be able to operate on direct byte buffers, so resort to Unsafe as a stop gap.

We'll revisit this later, possibly when the Foreign-Memory Access API
becomes final.
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.

Does not work with java 16+?
2 participants