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

wenxin he commented on HADOOP-14485:
------------------------------------

any reassign will cause compilation error, so remove the redundant 'final' 
modifier in the patch.

{code}
try (YarnClient client = new MockYarnClient()) {
      client.init(conf);
      client.start();
      client = null;
{code}

{code}
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] 
/home/vincent/Codebase/apache/hadoop/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/api/impl/TestYarnClient.java:[309,7]
 auto-closeable resource client may not be assigned
{code}

> Redundant 'final' modifier in try-with-resources statement
> ----------------------------------------------------------
>
>                 Key: HADOOP-14485
>                 URL: https://issues.apache.org/jira/browse/HADOOP-14485
>             Project: Hadoop Common
>          Issue Type: Improvement
>    Affects Versions: 3.0.0-alpha4
>            Reporter: wenxin he
>            Priority: Minor
>         Attachments: HADOOP-14485.001.patch
>
>
> Redundant 'final' modifier in the try-with-resources statement. Any variable 
> declared in the try-with-resources statement is implicitly modified with 
> final.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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

Reply via email to