commit | 24deb90311e302bcd5a52789d2084b4bdb25d269 | [log] [tgz] |
---|---|---|
author | Sho SHIMIZU <sshimizu@us.fujitsu.com> | Mon May 11 18:40:48 2015 -0700 |
committer | Gerrit Code Review <gerrit@onlab.us> | Tue May 12 19:10:02 2015 +0000 |
tree | 1d64e91c275db518efeb511609707509196b081d | |
parent | 6d44d1984df2e8ddfd54a904e191e460ca9e8ac3 [diff] |
Simplify condition Change-Id: Ie67c897517167163d79fee613ce954a372810166
diff --git a/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/grouphandler/PolicyGroupHandler.java b/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/grouphandler/PolicyGroupHandler.java index c7ce295..c313d39 100644 --- a/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/grouphandler/PolicyGroupHandler.java +++ b/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/grouphandler/PolicyGroupHandler.java
@@ -15,6 +15,7 @@ */ package org.onosproject.segmentrouting.grouphandler; +import static com.google.common.base.Preconditions.checkArgument; import static org.slf4j.LoggerFactory.getLogger; import java.util.ArrayList; @@ -322,9 +323,7 @@ } public void removeGroupChain(PolicyGroupIdentifier key) { - if (!(key instanceof PolicyGroupIdentifier)) { - throw new IllegalArgumentException(); - } + checkArgument(key != null); List<PolicyGroupIdentifier> groupsToBeDeleted = new ArrayList<PolicyGroupIdentifier>(); groupsToBeDeleted.add(key);