From 8ffef26d562949597a92d2c1a9e2559f62d36a80 Mon Sep 17 00:00:00 2001 From: Tony Tkacik Date: Thu, 28 Nov 2013 09:36:49 +0100 Subject: [PATCH] Fixed Group and Meter RPC model to use MD-SAL routing correctly - Changed RPCs in Group and Meter to use node-context-ref instead of node for routing information (same pattern as in flow-services). - Updated statistics manager to use updated code. Change-Id: I7e6b156665008fea5814f6cdb16ed8de2511759a Signed-off-by: Tony Tkacik --- .../sal/binding/codegen/impl/RuntimeCodeGenerator.xtend | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/codegen/impl/RuntimeCodeGenerator.xtend b/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/codegen/impl/RuntimeCodeGenerator.xtend index 801e4984c0..90fcbd99aa 100644 --- a/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/codegen/impl/RuntimeCodeGenerator.xtend +++ b/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/codegen/impl/RuntimeCodeGenerator.xtend @@ -57,7 +57,14 @@ class RuntimeCodeGenerator implements org.opendaylight.controller.sal.binding.co val targetCls = createClass(iface.directProxyName, supertype) [ field(DELEGATE_FIELD, iface); implementMethodsFrom(supertype) [ - body = '''return ($r) «DELEGATE_FIELD».«it.name»($$);''' + body = ''' + { + if(«DELEGATE_FIELD» == null) { + throw new java.lang.IllegalStateException("No provider is processing supplied message"); + } + return ($r) «DELEGATE_FIELD».«it.name»($$); + } + ''' ] ] return targetCls.toClass(iface.classLoader).newInstance as T -- 2.36.6