commit | 36b3793fc741b03ea9bbe6734b53b116f254ae6a | [log] [tgz] |
---|---|---|
author | Saurav Das <sauravdas@alumni.stanford.edu> | Fri Apr 07 17:24:38 2017 -0700 |
committer | Ray Milkey <ray@onlab.us> | Sat Apr 08 02:14:45 2017 +0000 |
tree | c3642fb036876b7fc8fc9ee3ae68b02475044c57 | |
parent | b3656d4ac83da9c848a256dd1a44d56a005e7947 [diff] |
NPE fix for groups command without the use of 'any' Change-Id: I59dc93ac4e4bef98141b8abe377ae2fbfe5d7d1a
diff --git a/cli/src/main/java/org/onosproject/cli/net/GroupsListCommand.java b/cli/src/main/java/org/onosproject/cli/net/GroupsListCommand.java index 610a6bf..be50a39 100644 --- a/cli/src/main/java/org/onosproject/cli/net/GroupsListCommand.java +++ b/cli/src/main/java/org/onosproject/cli/net/GroupsListCommand.java
@@ -104,7 +104,7 @@ new TreeMap<>(Comparators.ELEMENT_COMPARATOR); List<Group> groups; GroupState s = null; - if (!"any".equals(state)) { + if (state != null && !"any".equals(state)) { s = GroupState.valueOf(state.toUpperCase()); } Iterable<Device> devices = deviceService.getDevices();