Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Use Method.getParameterCount()
[controller.git]
/
opendaylight
/
md-sal
/
sal-binding-broker
/
src
/
main
/
java
/
org
/
opendaylight
/
controller
/
md
/
sal
/
binding
/
impl
/
RpcServiceAdapter.java
diff --git
a/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/impl/RpcServiceAdapter.java
b/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/impl/RpcServiceAdapter.java
index a9b1cc5cc49c08313e828b7c4f2758dd61710e25..51a4280f5cb895de78b77f427e07b7f9b326f110 100644
(file)
--- a/
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/impl/RpcServiceAdapter.java
+++ b/
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/impl/RpcServiceAdapter.java
@@
-98,7
+98,7
@@
class RpcServiceAdapter implements InvocationHandler {
final RpcInvocationStrategy rpc = rpcNames.get(method);
if (rpc != null) {
final RpcInvocationStrategy rpc = rpcNames.get(method);
if (rpc != null) {
- if (method.getParameter
Types().length
== 0) {
+ if (method.getParameter
Count()
== 0) {
return rpc.invokeEmpty();
}
if (args.length != 1) {
return rpc.invokeEmpty();
}
if (args.length != 1) {
@@
-116,11
+116,11
@@
class RpcServiceAdapter implements InvocationHandler {
private static boolean isObjectMethod(final Method method) {
switch (method.getName()) {
case "toString":
private static boolean isObjectMethod(final Method method) {
switch (method.getName()) {
case "toString":
- return method.getReturnType().equals(String.class) && method.getParameter
Types().length
== 0;
+ return method.getReturnType().equals(String.class) && method.getParameter
Count()
== 0;
case "hashCode":
case "hashCode":
- return method.getReturnType().equals(int.class) && method.getParameter
Types().length
== 0;
+ return method.getReturnType().equals(int.class) && method.getParameter
Count()
== 0;
case "equals":
case "equals":
- return method.getReturnType().equals(boolean.class) && method.getParameter
Types().length
== 1 && method
+ return method.getReturnType().equals(boolean.class) && method.getParameter
Count()
== 1 && method
.getParameterTypes()[0] == Object.class;
default:
return false;
.getParameterTypes()[0] == Object.class;
default:
return false;