-
Notifications
You must be signed in to change notification settings - Fork 4.8k
HIVE-28643: Fix "Error getting slot value" for Java 12 and above #5828
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
base: master
Are you sure you want to change the base?
Conversation
@vrozov There is an alternative provided for this so I have already fixed it which is present JDK 17 PR , currently in WIP which will be rebased to the main PR soon. Using the MethodHandles privateLookupIn , slot can be accessed. |
It requires JDK 9 and above. Do you suggest that support for JDK 8 is completely dropped in 4.1? |
|
Yes. We can't support JDK8 and JDK17 together. |
It is possible to compile to Java 8 byte code and test both with Java 8 and any other version of Java including 17. IMO, dropping support for Java 8 should be done as part of major version upgrade.
The option applies only at runtime and may be provided for Java 17 only if necessary
Which dependencies? All current dependencies are Java 8 compatible. |
We are dropping support for jdk8 in |
What changes were proposed in this pull request?
Use
getDeclaredFields0
to try gettingslot
Field
ifgetDeclaredField
fails. Fallback to the old non deterministic behavior ifslot
field is not accessible.Why are the changes needed?
Java 12 and above filters out private fields of the
Field
class causing "Error getting slot value".Does this PR introduce any user-facing change?
No
How was this patch tested?
Verified manually that the error is gone on Java 17. Using existing test for the rest.