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

Naganarasimha G R commented on YARN-6517:
-----------------------------------------

[~cheersyang], Bad on my part, Findbugs issue was still existent on the last 
patch can you have a look at it ? though the build is not available you can 
refer this 
[link|https://builds.apache.org/job/PreCommit-YARN-Build/16184/artifact/patchprocess/branch-findbugs-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-common-warnings.html#NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE]
 from YARN-5006 
i think we can do something like below to avoid 
{code}
      File[] filesList ;
      if(containerLogDir == null ||
          (filesList = containerLogDir.listFiles()) == null) {
        return new HashSet<>(0);
      }
      Set<File> candidates =
          new HashSet<File>(Arrays.asList(filesList));
{code}
if you still have problems then we can add it to the exception list.

> Fix warnings from Spotbugs in hadoop-yarn-common
> ------------------------------------------------
>
>                 Key: YARN-6517
>                 URL: https://issues.apache.org/jira/browse/YARN-6517
>             Project: Hadoop YARN
>          Issue Type: Bug
>            Reporter: Weiwei Yang
>            Assignee: Weiwei Yang
>              Labels: findbugs
>             Fix For: 2.9.0, 3.0.0-alpha4
>
>         Attachments: YARN-6517.001.patch, YARN-6517.002.patch
>
>
> There are 2 findbugs warnings in hadoop-yarn-common project since switched to 
> spotbugs,
> # Possible null pointer dereference in 
> org.apache.hadoop.yarn.logaggregation.AggregatedLogFormat$LogValue.getPendingLogFilesToUpload(File)
>  due to return value of called method
> # Possible null pointer dereference in 
> org.apache.hadoop.yarn.util.ProcfsBasedProcessTree.getProcessList() due to 
> return value of called method
> see more in 
> [https://builds.apache.org/job/PreCommit-HADOOP-Build/12157/artifact/patchprocess/branch-findbugs-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-common-warnings.html]



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org

Reply via email to