[
https://issues.apache.org/jira/browse/GEODE-136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15555266#comment-15555266
]
ASF GitHub Bot commented on GEODE-136:
--------------------------------------
Github user asfgit closed the pull request at:
https://github.com/apache/incubator-geode/pull/253
> 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)