diff options
author | Michael Dürre <michael.duerre@highstreet-technologies.com> | 2022-08-31 08:46:55 +0200 |
---|---|---|
committer | Dan Timoney <dtimoney@att.com> | 2022-08-31 21:04:07 +0000 |
commit | 34f89faa64f815d5cf33d0905046eaf392017b39 (patch) | |
tree | 7bd6295609feb87b3fa187602985b58e34965fe4 /sdnr/wt/netconfnode-state-service/provider/src/main | |
parent | 63d92319b01b54d72bde494f923f80eb6c242cfe (diff) |
add fixes for wt sulfur
fix devmgrs and db access
Issue-ID: CCSDK-3749
Signed-off-by: Michael Dürre <michael.duerre@highstreet-technologies.com>
Change-Id: I41018d2daa55b200a9ba89e784f8adf4200d32c3
Signed-off-by: Michael Dürre <michael.duerre@highstreet-technologies.com>
Diffstat (limited to 'sdnr/wt/netconfnode-state-service/provider/src/main')
-rw-r--r-- | sdnr/wt/netconfnode-state-service/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/impl/access/NetconfAccessorManager.java | 10 |
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); + } + } |