Restore support for Android versions not supporting MethodHandles#1731
Open
matthiasblaesing wants to merge 3 commits into
Open
Restore support for Android versions not supporting MethodHandles#1731matthiasblaesing wants to merge 3 commits into
matthiasblaesing wants to merge 3 commits into
Conversation
Android supports MethodHandle starting from API release 26 (Android Oreo). While that release happened about 9 years ago, users are stuck there because retailers fail to provide updates and the Dalvik/ART runtime become only independently updateable with Android 12 in 2021. So this changeset rewrites the MethodHandle based implementation into a reflection based one. Closes: java-native-access#1730
Member
Author
|
@dbwiddis could you please have a look? If ok, I consider to release |
dbwiddis
reviewed
Jun 11, 2026
dbwiddis
left a comment
Contributor
There was a problem hiding this comment.
One needed fix inline.
And a change log entry needed.
Otherwise LGTM!
Contributor
There was a problem hiding this comment.
I think you need to add null here similar to the stackWalkerGetInstance invoke() change.
… add Changelog entry)
Member
Author
|
@dbwiddis you are right in both regards. Updated (will squash before merge) |
dbwiddis
approved these changes
Jun 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Android supports MethodHandle starting from API release 26 (Android Oreo). While that release happened about 9 years ago, users are stuck there because retailers fail to provide updates and the Dalvik/ART runtime become only independently updateable with Android 12 in 2021.
So this changeset rewrites the MethodHandle based implementation into a reflection based one.
Closes: #1730