Merge "Use Preconditions"
authorTony Tkacik <ttkacik@cisco.com>
Mon, 23 Feb 2015 10:43:13 +0000 (10:43 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Mon, 23 Feb 2015 10:43:14 +0000 (10:43 +0000)
opendaylight/md-sal/messagebus-impl/src/main/java/org/opendaylight/controller/messagebus/app/impl/Topic.java

index aebde0c0432df8fb3f75085f8cc749d0b8e39bdc..a32413064e429403aeaa9a032845e3a34ee8fbde 100644 (file)
@@ -63,10 +63,7 @@ public class Topic implements DataChangeListener {
     public void notifyNode(final NodeId nodeId) {
         JoinTopicInput jti = getJoinTopicInputArgument(nodeId);
         EventSourceService ess = mdSal.getRpcService(EventSourceService.class);
-
-        if (ess == null) {
-            throw new IllegalStateException("EventSourceService is not registered.");
-        }
+        Preconditions.checkState(ess != null, "EventSourceService is not registered");
 
         ess.joinTopic(jti);
     }