aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/utils/CmHandleIdMapper.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/utils/CmHandleIdMapper.java b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/utils/CmHandleIdMapper.java
index 8175fb5e74..a88adbd110 100644
--- a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/utils/CmHandleIdMapper.java
+++ b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/utils/CmHandleIdMapper.java
@@ -73,7 +73,13 @@ public class CmHandleIdMapper {
public void removeMapping(final String cmHandleId) {
final String alternateId = alternateIdPerCmHandleId.remove(cmHandleId);
- cmHandleIdPerAlternateId.remove(alternateId);
+ removeAlternateIdWithValidation(alternateId);
+ }
+
+ private void removeAlternateIdWithValidation(final String alternateId) {
+ if (alternateId != null) {
+ cmHandleIdPerAlternateId.remove(alternateId);
+ }
}
private void initializeCache() {