commit | 11ead6e3f007a97366d69e05765c263c2d679aab | [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 | 270dc8a4b70cecfbf8e75149718e67f8e6cbd79a | |
parent | 84684a58ba1c207fe0e92c70c0d5f80ec2c79974 [diff] [blame] |
Simplify condition Change-Id: Ie67c897517167163d79fee613ce954a372810166
diff --git a/src/main/java/org/onosproject/segmentrouting/grouphandler/PolicyGroupHandler.java b/src/main/java/org/onosproject/segmentrouting/grouphandler/PolicyGroupHandler.java index c7ce295..c313d39 100644 --- a/src/main/java/org/onosproject/segmentrouting/grouphandler/PolicyGroupHandler.java +++ b/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);