aboutsummaryrefslogtreecommitdiffstats
path: root/sdnr/wt/netconfnode-state-service
diff options
context:
space:
mode:
Diffstat (limited to 'sdnr/wt/netconfnode-state-service')
-rw-r--r--sdnr/wt/netconfnode-state-service/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/impl/access/NetconfAccessorManager.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/sdnr/wt/netconfnode-state-service/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/impl/access/NetconfAccessorManager.java b/sdnr/wt/netconfnode-state-service/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/impl/access/NetconfAccessorManager.java
index 6c3704421..a66da6970 100644
--- a/sdnr/wt/netconfnode-state-service/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/impl/access/NetconfAccessorManager.java
+++ b/sdnr/wt/netconfnode-state-service/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/impl/access/NetconfAccessorManager.java
@@ -56,9 +56,9 @@ public class NetconfAccessorManager {
public NetconfAccessor getAccessor(NodeId nNodeId, NetconfNode netconfNode) {
NetconfAccessor res = new NetconfAccessorImpl(nNodeId, netconfNode, netconfCommunicatorManager, domContext, netconfNodeStateService);
- NetconfAccessor previouse = accessorList.put(nNodeId, res);
+ NetconfAccessor previouse = accessorList.putIfAbsent(nNodeId, res);
if (Objects.nonNull(previouse)) {
- LOG.warn("Accessor with name already available. Replaced with new one.");
+ LOG.warn("Accessor with name already available. Don't add {}", nNodeId);
}
return res;
}
@@ -68,7 +68,11 @@ public class NetconfAccessorManager {
}
public void removeAccessor(NodeId nNodeId) {
- accessorList.remove(nNodeId);
+ NetconfAccessor previouse = accessorList.remove(nNodeId);
+ if (Objects.nonNull(previouse)) {
+ LOG.warn("Accessor with name was not available during remove {}", nNodeId);
+ }
+
}