commit | 3f1c61e79f0629de0174f972c3311f09490788e9 | [log] [tgz] |
---|---|---|
author | Andrea Campanella <andrea@onlab.us> | Fri Apr 01 17:30:12 2016 -0700 |
committer | Gerrit Code Review <gerrit@onlab.us> | Mon Apr 04 14:37:08 2016 +0000 |
tree | a3ebf18bb1ae64050ce9dee4dbb7f467c29c2d1d | |
parent | 1ffa46b5b351a7bbcf9c2b3bb979c130d3125e29 [diff] |
Removing listeners from deviceService at deactivation of Group and Flow managers to avoid NPE Change-Id: Ia7526913e4f50b4c49ce9f2ae9ddf85c2db77a3a
diff --git a/core/net/src/main/java/org/onosproject/net/flow/impl/FlowRuleManager.java b/core/net/src/main/java/org/onosproject/net/flow/impl/FlowRuleManager.java index c3f1200..c074177 100644 --- a/core/net/src/main/java/org/onosproject/net/flow/impl/FlowRuleManager.java +++ b/core/net/src/main/java/org/onosproject/net/flow/impl/FlowRuleManager.java
@@ -160,6 +160,7 @@ @Deactivate public void deactivate() { + deviceService.removeListener(deviceListener); cfgService.unregisterProperties(getClass(), false); deviceInstallers.shutdownNow(); operationsService.shutdownNow();
diff --git a/core/net/src/main/java/org/onosproject/net/group/impl/GroupManager.java b/core/net/src/main/java/org/onosproject/net/group/impl/GroupManager.java index 8355aa8..0d1b888 100644 --- a/core/net/src/main/java/org/onosproject/net/group/impl/GroupManager.java +++ b/core/net/src/main/java/org/onosproject/net/group/impl/GroupManager.java
@@ -102,6 +102,7 @@ @Deactivate public void deactivate() { + deviceService.removeListener(deviceListener); cfgService.unregisterProperties(getClass(), false); store.unsetDelegate(delegate); eventDispatcher.removeSink(GroupEvent.class);