Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id B00C4200B9A for ; Fri, 7 Oct 2016 21:01:27 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id AEA48160AE8; Fri, 7 Oct 2016 19:01:27 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id F32E8160AC6 for ; Fri, 7 Oct 2016 21:01:26 +0200 (CEST) Received: (qmail 10335 invoked by uid 500); 7 Oct 2016 19:01:26 -0000 Mailing-List: contact issues-help@geode.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@geode.incubator.apache.org Delivered-To: mailing list issues@geode.incubator.apache.org Received: (qmail 10326 invoked by uid 99); 7 Oct 2016 19:01:26 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Oct 2016 19:01:26 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id ADF401A043B for ; Fri, 7 Oct 2016 19:01:25 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -6.219 X-Spam-Level: X-Spam-Status: No, score=-6.219 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 38nNv0ssZNmD for ; Fri, 7 Oct 2016 19:01:23 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with SMTP id F39A55FB6C for ; Fri, 7 Oct 2016 19:01:21 +0000 (UTC) Received: (qmail 9135 invoked by uid 99); 7 Oct 2016 19:01:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Oct 2016 19:01:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id BFE5D2C2A6B for ; Fri, 7 Oct 2016 19:01:20 +0000 (UTC) Date: Fri, 7 Oct 2016 19:01:20 +0000 (UTC) From: "ASF subversion and git services (JIRA)" To: issues@geode.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (GEODE-136) Fix possible NullPointerException in Gfsh's 'list regions' command's GetRegionsFunction. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 07 Oct 2016 19:01:27 -0000 [ https://issues.apache.org/jira/browse/GEODE-136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15555974#comment-15555974 ] ASF subversion and git services commented on GEODE-136: ------------------------------------------------------- Commit 9189e3bb95fcd8547327c6047dafea5e0fd76dbb in incubator-geode's branch refs/heads/develop from [~nnag] [ https://git-wip-us.apache.org/repos/asf?p=incubator-geode.git;h=9189e3b ] GEODE-136: Adding the Apache License header to the file. * This resolves the rat issue in precheckin > Fix possible NullPointerException in Gfsh's 'list regions' command's GetRegionsFunction. > ---------------------------------------------------------------------------------------- > > Key: GEODE-136 > URL: https://issues.apache.org/jira/browse/GEODE-136 > Project: Geode > Issue Type: Bug > Components: gfsh > Affects Versions: 1.0.0-incubating > Environment: GemFire Manager + Gfsh > Reporter: John Blum > Assignee: Kevin Duling > Labels: ApacheGeode, CLI, GFSH, GetRegionsFunction, list-regions > Fix For: 1.0.0-incubating > > > The following line ([#48|https://github.com/apache/incubator-geode/blob/develop/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/functions/GetRegionsFunction.java#L48]) in the {{GetRegionsFunction}} class could possibly lead to a NPE if the {{regions}} _Set_ is null since the {{regions.isEmpty()}} call proceeds the {{regions == null}} check. > Of course, one should argue whether {{Cache.rootRegions()}} should be returning a null _Set_ at all rather than an empty _Set_ if there are in fact no "root" _Regions_ in the Geode _Cache_. > But then, one could also argue that this {{GetRegionsFunction}} should not be returning a null "array" if there are no "root" _Regions_ in the Geode _Cache_ either. It too should be returning an "empty" array. -- This message was sent by Atlassian JIRA (v6.3.4#6332)