X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-remoterpc-connector%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fremote%2Frpc%2Fregistry%2Fmbeans%2FRemoteActionRegistryMXBeanImpl.java;h=bacde76a4b7189731e2bb15c6188d212173b2d06;hp=cc117bd167f90562828c3a34676c47a1a059e7d2;hb=1d0370feb32b84119bf4c570b9e6e9abbe8d9511;hpb=c355a5b632433b9d2a54107d24e644e68610f270 diff --git a/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/registry/mbeans/RemoteActionRegistryMXBeanImpl.java b/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/registry/mbeans/RemoteActionRegistryMXBeanImpl.java index cc117bd167..bacde76a4b 100644 --- a/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/registry/mbeans/RemoteActionRegistryMXBeanImpl.java +++ b/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/registry/mbeans/RemoteActionRegistryMXBeanImpl.java @@ -33,12 +33,10 @@ public class RemoteActionRegistryMXBeanImpl extends AbstractRegistryMXBean routedAction = new HashSet<>(table.getItems().size()); for (DOMActionInstance route : table.getItems()) { - if (route.getType().getLastComponent() != null) { - final YangInstanceIdentifier actionPath = YangInstanceIdentifier.create( - new NodeIdentifier(route.getType().getLastComponent())); - if (!actionPath.isEmpty()) { - routedAction.add(ROUTE_CONSTANT + actionPath + NAME_CONSTANT + route.getType()); - } + final YangInstanceIdentifier actionPath = YangInstanceIdentifier.create(new NodeIdentifier( + route.getType().lastNodeIdentifier())); + if (!actionPath.isEmpty()) { + routedAction.add(ROUTE_CONSTANT + actionPath + NAME_CONSTANT + route.getType()); } } @@ -86,14 +84,12 @@ public class RemoteActionRegistryMXBeanImpl extends AbstractRegistryMXBean routes = table.getItems(); Map actionMap = new HashMap<>(routes.size()); for (DOMActionInstance route : routes) { - if (route.getType().getLastComponent() != null) { - final YangInstanceIdentifier actionPath = YangInstanceIdentifier.create( - new NodeIdentifier(route.getType().getLastComponent())); - if (!actionPath.isEmpty()) { - String routeString = actionPath.toString(); - if (routeString.contains(routeName)) { - actionMap.put(ROUTE_CONSTANT + routeString + NAME_CONSTANT + route.getType(), address); - } + final YangInstanceIdentifier actionPath = YangInstanceIdentifier.create(new NodeIdentifier( + route.getType().lastNodeIdentifier())); + if (!actionPath.isEmpty()) { + String routeString = actionPath.toString(); + if (routeString.contains(routeName)) { + actionMap.put(ROUTE_CONSTANT + routeString + NAME_CONSTANT + route.getType(), address); } } } @@ -108,14 +104,12 @@ public class RemoteActionRegistryMXBeanImpl extends AbstractRegistryMXBean routes = table.getItems(); Map actionMap = new HashMap<>(routes.size()); for (DOMActionInstance route : routes) { - if (route.getType().getLastComponent() != null) { - final YangInstanceIdentifier actionPath = YangInstanceIdentifier.create( - new NodeIdentifier(route.getType().getLastComponent())); - if (!actionPath.isEmpty()) { - String type = route.getType().toString(); - if (type.contains(name)) { - actionMap.put(ROUTE_CONSTANT + actionPath + NAME_CONSTANT + type, address); - } + final YangInstanceIdentifier actionPath = YangInstanceIdentifier.create(new NodeIdentifier( + route.getType().lastNodeIdentifier())); + if (!actionPath.isEmpty()) { + String type = route.getType().toString(); + if (type.contains(name)) { + actionMap.put(ROUTE_CONSTANT + actionPath + NAME_CONSTANT + type, address); } } }