[ 
https://issues.apache.org/jira/browse/HADOOP-18690?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17708912#comment-17708912
 ] 

ASF GitHub Bot commented on HADOOP-18690:
-----------------------------------------

anujmodi2021 commented on code in PR #5535:
URL: https://github.com/apache/hadoop/pull/5535#discussion_r1158539279


##########
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azure/security/TokenUtils.java:
##########
@@ -40,10 +39,10 @@ private TokenUtils() {
   public static Token<DelegationTokenIdentifier> toDelegationToken(
       final Map<?, ?> inputMap) throws IOException {
     final Map<?, ?> m = (Map<?, ?>) inputMap.get(Token.class.getSimpleName());
-    return (Token<DelegationTokenIdentifier>) toToken(m);
+    return toToken(m);
   }
 
-  public static Token<? extends TokenIdentifier> toToken(final Map<?, ?> m)
+  public static Token<DelegationTokenIdentifier> toToken(final Map<?, ?> m)

Review Comment:
   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.





> Fix for Javac Error of Unchecked Cast
> -------------------------------------
>
>                 Key: HADOOP-18690
>                 URL: https://issues.apache.org/jira/browse/HADOOP-18690
>             Project: Hadoop Common
>          Issue Type: Sub-task
>          Components: fs/azure
>            Reporter: Anuj Modi
>            Assignee: Anuj Modi
>            Priority: Blocker
>              Labels: pull-request-available
>             Fix For: 3.3.0, 3.3.5
>
>
> This task is to fix javac unchecked cast error on yetus build.
> Yetus checks on PR are failing at javac step with the error:
> *"hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azure/security/TokenUtils.java:43:53:[unchecked]
>  unchecked cast"*
> This is blocking other PRs in the branches 3.3.3, 3.3.4, 3.3.2
> This task will fix this error/warning and unblock other PRs.
> Blocked PRs:
> 1. [Backport HADOOP-18546: ABFS: Disable purging list of in progress reads in 
> abfs stream closed in 3.3.2 by anujmodi2021 · Pull Request #5529 · 
> apache/hadoop (github.com)|https://github.com/apache/hadoop/pull/5529]
> 2. [Backport HADOOP-18546: ABFS: Disable purging list of in progress reads in 
> abfs stream closed in 3.3.3 by anujmodi2021 · Pull Request #5530 · 
> apache/hadoop (github.com)|https://github.com/apache/hadoop/pull/5530]
> 3. [Backport HADOOP-18546: ABFS: Disable purging list of in progress reads in 
> abfs stream closed in 3.3.4 by anujmodi2021 · Pull Request #5531 · 
> apache/hadoop (github.com)|https://github.com/apache/hadoop/pull/5531]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to