Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Fixed bug in discovering JVM loaded case classes during code generation
[controller.git]
/
opendaylight
/
md-sal
/
sal-binding-broker
/
src
/
main
/
java
/
org
/
opendaylight
/
controller
/
sal
/
binding
/
codegen
/
impl
/
RuntimeCodeGenerator.xtend
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 7ebcf02e41fb0ba7e17268aeee1d13f679ff3d31..d9e0983cfa516f07e0285dab813b5b0c1b3aec17 100644
(file)
--- 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
@@
-71,7
+71,7
@@
class RuntimeCodeGenerator implements org.opendaylight.controller.sal.binding.co
body = '''
{
if(«DELEGATE_FIELD» == null) {
body = '''
{
if(«DELEGATE_FIELD» == null) {
- throw new java.lang.IllegalStateException("No
provider is processing supplied messag
e");
+ throw new java.lang.IllegalStateException("No
default provider is availabl
e");
}
return ($r) «DELEGATE_FIELD».«it.name»($$);
}
}
return ($r) «DELEGATE_FIELD».«it.name»($$);
}
@@
-91,7
+91,7
@@
class RuntimeCodeGenerator implements org.opendaylight.controller.sal.binding.co
return instance;
}
return instance;
}
- override <T extends RpcService> getRouterFor(Class<T> iface) {
+ override <T extends RpcService> getRouterFor(Class<T> iface
,String routerInstanceName
) {
val metadata = withClassLoader(iface.classLoader) [|
val supertype = iface.asCtClass
return supertype.rpcMetadata;
val metadata = withClassLoader(iface.classLoader) [|
val supertype = iface.asCtClass
return supertype.rpcMetadata;
@@
-127,7
+127,7
@@
class RuntimeCodeGenerator implements org.opendaylight.controller.sal.binding.co
instance = «DELEGATE_FIELD»;
}
if(instance == null) {
instance = «DELEGATE_FIELD»;
}
if(instance == null) {
- throw new java.lang.IllegalStateException("No
provider is processing supplied message"
);
+ throw new java.lang.IllegalStateException("No
routable provider is processing routed message for " + String.valueOf(identifier)
);
}
return ($r) instance.«it.name»($$);
}'''
}
return ($r) instance.«it.name»($$);
}'''
@@
-148,7
+148,7
@@
class RuntimeCodeGenerator implements org.opendaylight.controller.sal.binding.co
return targetCls.toClass(iface.classLoader,iface.protectionDomain).newInstance as T
];
return targetCls.toClass(iface.classLoader,iface.protectionDomain).newInstance as T
];
- return new RpcRouterCodegenInstance(iface, instance, metadata.contexts,metadata.supportedInputs);
+ return new RpcRouterCodegenInstance(
routerInstanceName,
iface, instance, metadata.contexts,metadata.supportedInputs);
}
private def RpcServiceMetadata getRpcMetadata(CtClass iface) {
}
private def RpcServiceMetadata getRpcMetadata(CtClass iface) {