[ https://issues.apache.org/jira/browse/GEODE-136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15547139#comment-15547139 ]
ASF GitHub Bot commented on GEODE-136: -------------------------------------- GitHub user kjduling opened a pull request: https://github.com/apache/incubator-geode/pull/253 GEODE-136: Fix possible NullPointerException in GetRegionsFunction Addresses an unlikely but possible NPE. Removes use of a deprecated interface. Introduces a missing unit test. You can merge this pull request into a Git repository by running: $ git pull https://github.com/kjduling/incubator-geode feature/GEODE-136 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-geode/pull/253.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #253 ---- commit 99114411aae2e9238f1a1e8e115b1e494e78e000 Author: Kevin Duling <kdul...@pivotal.io> Date: 2016-10-05T00:08:17Z GEODE-136: Fix possible NullPointerException in Gfsh's 'list regions' command's GetRegionsFunction. ---- > 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)