-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
HBASE-25227 [branch-1] Fix Java 11 runtime issue in UnsafeAccess #2594
Conversation
…issue UnsafeAccess is observed to throw NoSuchMethodErrors running on Java 11. Some of our methods accept 'int' parameters and use them as parameters to Unsafe methods expecting 'long'. The Java 8 compiler does the implicit conversion but the Java 11 compiler does not. Add casts to fix. Not an issue on branch-2 and up.
💔 -1 overall
This message was automatically generated. |
Fix checkstyle issues |
🎊 +1 overall
This message was automatically generated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1, what about directly changing BYTE_ARRAY_BASE_OFFSET's type to long
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
Ya that single change will be enough then and can avoid all cast |
Ok |
Change uses @Reidddddd and @anoopsjohn suggestion instead of casts |
🎊 +1 overall
This message was automatically generated. |
I'm not sure what happened here. Applying the commit locally. |
Reapply with corrected commit message. Signed-off-by: Reid Chan <reidchan@apache.org> Signed-off-by: Viraj Jasani <vjasani@apache.org> Signed-off-by: Bharath Vissapragada <bharathv@apache.org> Signed-off-by: Michael Stack <stack@apache.org>
UnsafeAccess is observed to throw NoSuchMethodErrors running on Java 11. Some of our methods accept 'int' parameters and use them as parameters to Unsafe methods expecting 'long'. Not an issue on branch-2 and up.