diff options
author | Lee Anjella Macabuhay <lee.anjella.macabuhay@est.tech> | 2024-09-16 13:40:00 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2024-09-16 13:40:00 +0000 |
commit | 3cf653576440e233d195e2e54851aec833ee9922 (patch) | |
tree | 4dfb06ebd5477de03796b28b3106aa1aaeadef2c | |
parent | cca257663f6e09303591a9bf639436eb5c98cc2d (diff) | |
parent | ebba970be8756e8b25e0be323a7c251a3f989ecf (diff) |
Merge "Fix violation reported by sonarqube"
2 files changed, 1 insertions, 2 deletions
diff --git a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/inventory/InventoryPersistenceImpl.java b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/inventory/InventoryPersistenceImpl.java index 42123f1a26..13cde86b6e 100644 --- a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/inventory/InventoryPersistenceImpl.java +++ b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/inventory/InventoryPersistenceImpl.java @@ -208,7 +208,7 @@ public class InventoryPersistenceImpl extends NcmpPersistenceImpl implements Inv @Override public boolean isExistingCmHandleId(final String cmHandleId) { try { - return getCmHandleDataNodeByCmHandleId(cmHandleId).size() > 0; + return !getCmHandleDataNodeByCmHandleId(cmHandleId).isEmpty(); } catch (final DataNodeNotFoundException exception) { return false; } diff --git a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/utils/events/CmAvcEventPublisher.java b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/utils/events/CmAvcEventPublisher.java index 06269d5177..2a9717cc1a 100644 --- a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/utils/events/CmAvcEventPublisher.java +++ b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/utils/events/CmAvcEventPublisher.java @@ -29,7 +29,6 @@ import org.onap.cps.events.EventsPublisher; import org.onap.cps.ncmp.events.avc.ncmp_to_client.Avc; import org.onap.cps.ncmp.events.avc.ncmp_to_client.AvcEvent; import org.onap.cps.ncmp.events.avc.ncmp_to_client.Data; -import org.onap.cps.ncmp.utils.events.NcmpEvent; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; |