hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "zhihai xu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-2757) potential NPE in checkNodeLabelExpression of SchedulerUtils for nodeLabels.
Date Tue, 28 Oct 2014 23:10:34 GMT

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

zhihai xu commented on YARN-2757:
---------------------------------

Hi [~leftnoteasy],

thanks to review the patch. I agree to change the priority to minor.
I just want to make sure the code is consistent either both check the null pointer or both
don't check the null pointer.

zhihai

> potential NPE in checkNodeLabelExpression of SchedulerUtils for nodeLabels.
> ---------------------------------------------------------------------------
>
>                 Key: YARN-2757
>                 URL: https://issues.apache.org/jira/browse/YARN-2757
>             Project: Hadoop YARN
>          Issue Type: Bug
>            Reporter: zhihai xu
>            Assignee: zhihai xu
>            Priority: Minor
>         Attachments: YARN-2757.000.patch
>
>
> pontential NPE in checkNodeLabelExpression of SchedulerUtils for nodeLabels.
> since we check the nodeLabels null at 
> {code}
>         if (!str.trim().isEmpty()
>             && (nodeLabels == null || !nodeLabels.contains(str.trim()))) {
>           return false;
>         }
> {code}
> We should also check nodeLabels null at 
> {code}
>       if (!nodeLabels.isEmpty()) {
>         return false;
>       }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message