John Blum created GEODE-136: ------------------------------- Summary: 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: management & tools Affects Versions: 1.0.0-incubating Environment: GemFire Manager + Gfsh Reporter: John Blum
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)