-
Notifications
You must be signed in to change notification settings - Fork 9.2k
HADOOP-18690: Fix for Javac Error of Unchecked Cast #5535
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
Conversation
| } | ||
|
|
||
| public static Token<? extends TokenIdentifier> toToken(final Map<?, ?> m) | ||
| public static Token<DelegationTokenIdentifier> toToken(final Map<?, ?> m) |
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.
The only possible return type from this function (apart from null) is "Token<DelegationTokenIdentifier>". Therefore it seems safe to deterministically define the return type instead of generic return type here. This will solve the Unchecked Cast Error.
|
💔 -1 overall
This message was automatically generated. |
…istStatusRemoteIterator
|
💔 -1 overall
This message was automatically generated. |
|
3.3..4 branch is released. No changes accepted for this branch. Closing |
Description of PR
This PR fixes the Unchecked Cast Error/Warning thrown at javac step of yetus checks on PR.
Jira ticket: https://issues.apache.org/jira/browse/HADOOP-18690
Fix is to deterministically type cast the return type of the function.
Since there is only one return type possible for the function, there is no need to type cast it.