Return-Path: X-Original-To: apmail-hadoop-yarn-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-yarn-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id ED2C017CE9 for ; Tue, 28 Oct 2014 00:20:35 +0000 (UTC) Received: (qmail 85793 invoked by uid 500); 28 Oct 2014 00:20:34 -0000 Delivered-To: apmail-hadoop-yarn-issues-archive@hadoop.apache.org Received: (qmail 85708 invoked by uid 500); 28 Oct 2014 00:20:34 -0000 Mailing-List: contact yarn-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: yarn-issues@hadoop.apache.org Delivered-To: mailing list yarn-issues@hadoop.apache.org Received: (qmail 85439 invoked by uid 99); 28 Oct 2014 00:20:34 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Oct 2014 00:20:34 +0000 Date: Tue, 28 Oct 2014 00:20:34 +0000 (UTC) From: "zhihai xu (JIRA)" To: yarn-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (YARN-2757) potential NPE in checkNodeLabelExpression of SchedulerUtils for nodeLabels. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 zhihai xu created YARN-2757: ------------------------------- Summary: 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: Improvement Reporter: zhihai xu Assignee: zhihai xu 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)