From 9237b0792526693f5cf302f4bfe0f1150d5662bc Mon Sep 17 00:00:00 2001 From: "halil.cakal" Date: Mon, 2 Sep 2024 14:30:02 +0100 Subject: Remove event notifications when removing trust level entries Issue-ID: CPS-2315 Change-Id: I4f0cb7c2066e0ab9c62ac9cdb0fc39ce7de7791b Signed-off-by: halil.cakal --- .../cps/ncmp/impl/inventory/trustlevel/TrustLevelManager.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'cps-ncmp-service/src/main/java') diff --git a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/inventory/trustlevel/TrustLevelManager.java b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/inventory/trustlevel/TrustLevelManager.java index 33310b955e..aff0e19981 100644 --- a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/inventory/trustlevel/TrustLevelManager.java +++ b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/inventory/trustlevel/TrustLevelManager.java @@ -145,17 +145,13 @@ public class TrustLevelManager { } /** - * Remove cm handle trust level from the cache and publish notification for trust level of cmHandles - * if it is COMPLETE. + * Remove cm handle trust level from the cache. * * @param cmHandleIds cm handle ids to be removed from the cache */ public void removeCmHandles(final Collection cmHandleIds) { for (final String cmHandleId : cmHandleIds) { - if (trustLevelPerCmHandle.containsKey(cmHandleId)) { - final TrustLevel oldTrustLevel = trustLevelPerCmHandle.remove(cmHandleId); - sendAvcNotificationIfRequired(cmHandleId, oldTrustLevel, TrustLevel.NONE); - } else { + if (trustLevelPerCmHandle.remove(cmHandleId) == null) { log.debug("Removed Cm handle: {} is not in trust level cache", cmHandleId); } } -- cgit 1.2.3-korg