diff options
author | halil.cakal <halil.cakal@est.tech> | 2024-09-25 11:07:01 +0100 |
---|---|---|
committer | halil.cakal <halil.cakal@est.tech> | 2024-09-25 15:46:38 +0100 |
commit | fe846d2dd21d57889356943762f2006b2122427c (patch) | |
tree | a50cb76c8d340f21a5b663e00971f8da1607c6b2 /cps-ncmp-service/src/main/java | |
parent | 2dbf14888235bf6140fe2e041e8681e15a725314 (diff) |
BugFix: 500 Server error when upgrade and service restart with data in DB
- return NONE for get effective trust level api if the trustlevel caches
empty (restart case)
Issue-ID: CPS-2409
Change-Id: I72a755ca6ba5d4a78f5458a235c0d1f43aaa8d53
Signed-off-by: halil.cakal <halil.cakal@est.tech>
Diffstat (limited to 'cps-ncmp-service/src/main/java')
-rw-r--r-- | cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/inventory/trustlevel/TrustLevelManager.java | 2 |
1 files changed, 1 insertions, 1 deletions
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 afe6ad5c1c..9b0cc3a0c0 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 @@ -140,7 +140,7 @@ public class TrustLevelManager { */ public TrustLevel getEffectiveTrustLevel(final String cmHandleId) { final TrustLevel dmiTrustLevel = TrustLevel.COMPLETE; // TODO: CPS-2375 - final TrustLevel cmHandleTrustLevel = trustLevelPerCmHandle.get(cmHandleId); + final TrustLevel cmHandleTrustLevel = trustLevelPerCmHandle.getOrDefault(cmHandleId, TrustLevel.NONE); return dmiTrustLevel.getEffectiveTrustLevel(cmHandleTrustLevel); } |