commit | 3a6f30702c388132610f4c90cde615fca6a3692f | [log] [tgz] |
---|---|---|
author | Jordi Ortiz <jordi.ortiz@um.es> | Mon Nov 07 10:23:48 2016 +0100 |
committer | Gerrit Code Review <gerrit@onlab.us> | Thu Nov 10 19:47:04 2016 +0000 |
tree | 0404e5496fc77fc3bd178ded8270290030faa39e | |
parent | a9b607cf51d936ff576340307e4eacdd52a68636 [diff] |
Add missing Sink to MeterManager. Without this patch no events are generated. Also checkstyle fix. Change-Id: I4df7992e6e4dc6c0829ebeff7ee4a9cc16b36be1
diff --git a/incubator/net/src/main/java/org/onosproject/incubator/net/meter/impl/MeterManager.java b/incubator/net/src/main/java/org/onosproject/incubator/net/meter/impl/MeterManager.java index dfbbd16..2cf658f 100644 --- a/incubator/net/src/main/java/org/onosproject/incubator/net/meter/impl/MeterManager.java +++ b/incubator/net/src/main/java/org/onosproject/incubator/net/meter/impl/MeterManager.java
@@ -83,9 +83,9 @@ public void activate() { store.setDelegate(delegate); + eventDispatcher.addSink(MeterEvent.class, listenerRegistry); - onComplete = (request, result, error) -> - { + onComplete = (request, result, error) -> { request.context().ifPresent(c -> { if (error != null) { c.onError(request, MeterFailReason.UNKNOWN);