Cleanup NamespaceBehaviourWithListeners
[yangtools.git] / yang / yang-parser-impl / src / main / java / org / opendaylight / yangtools / yang / parser / stmt / reactor / StatementContextBase.java
index 4d35ad624c703c1d2389f2252a2584cda08e2a51..1807b101de3833d82ee1f62e73722a249acea9cc 100644 (file)
@@ -581,9 +581,9 @@ public abstract class StatementContextBase<A, D extends DeclaredStatement<A>, E
             "Namespace %s does not support listeners", type);
 
         final NamespaceBehaviourWithListeners<K, V, N> casted = (NamespaceBehaviourWithListeners<K, V, N>) behaviour;
-        casted.addValueListener(new ValueAddedListener<K>(this, key) {
+        casted.addListener(key, new ValueAddedListener<K>(this, key) {
             @Override
-            void onValueAdded(final Object key, final Object value) {
+            void onValueAdded(final Object value) {
                 listener.namespaceItemAdded(StatementContextBase.this, type, key, value);
             }
         });