commit | 8374e4f4ad1f8038d1d2889af5e564a874a25162 | [log] [tgz] |
---|---|---|
author | Pavlin Radoslavov <pavlin@onlab.us> | Thu Apr 10 11:56:15 2014 -0700 |
committer | Gerrit Code Review <gerrit2@onos-services> | Thu Apr 10 13:07:24 2014 -0700 |
tree | 53e6e91687716994de647650ffbb3668e30a0a83 | |
parent | 45a0ad36f3e55a5a4ebf3bd97d48fa1ca7e0d767 [diff] |
Fix issues found by FindBugs: RV_RETURN_VALUE_IGNORED_BAD_PRACTICE http://findbugs.sourceforge.net/bugDescriptions.html#RV_RETURN_VALUE_IGNORED_BAD_PRACTICE Note: This fix doesn't address explicitly the potential issue of preventing a queue from growing infinitely. This is a generic issue we might have in other parts of the code as well, and we need to address/evaluate it explicitly. Change-Id: I6908ba8625af7eda5f889a16245614c7df852cfe
diff --git a/src/main/java/net/onrc/onos/core/registry/ZookeeperRegistry.java b/src/main/java/net/onrc/onos/core/registry/ZookeeperRegistry.java index e91ab27..464dd01 100755 --- a/src/main/java/net/onrc/onos/core/registry/ZookeeperRegistry.java +++ b/src/main/java/net/onrc/onos/core/registry/ZookeeperRegistry.java
@@ -150,14 +150,14 @@ public void isLeader() { log.debug("Became leader for {}", dpid); - switchLeadershipEvents.offer(new SwitchLeaderEvent(HexString.toLong(dpid), true)); + switchLeadershipEvents.add(new SwitchLeaderEvent(HexString.toLong(dpid), true)); } @Override public void notLeader() { log.debug("Lost leadership for {}", dpid); - switchLeadershipEvents.offer(new SwitchLeaderEvent(HexString.toLong(dpid), false)); + switchLeadershipEvents.add(new SwitchLeaderEvent(HexString.toLong(dpid), false)); } }