hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "wenxin he (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-14485) Redundant 'final' modifier in try-with-resources statement
Date Sat, 03 Jun 2017 17:09:04 GMT

    [ 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: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


Mime
View raw message