Fix SonarQube warnings 30/137530/4
authorToineSiebelink <toine.siebelink@est.tech>
Tue, 19 Mar 2024 10:42:07 +0000 (10:42 +0000)
committerToineSiebelink <toine.siebelink@est.tech>
Tue, 19 Mar 2024 14:20:24 +0000 (14:20 +0000)
commit59a34f5f9e1aaea13df8903ac30ee8cb5735f205
tree9c721c49b79b75cdfb2b309bf8cc0a28d23f584b
parentbf75ff4d43dc9eb459deaf61920de22cf5c6f1ea
Fix SonarQube warnings

targetted:
- Introduced CmResourceAddress (name agreed with Daniel and Priyank)
- Extracted out private method in AltenateIdChecker to reduce complexity
side effects:
- use 'record' java feature as suggested by ItelliJ
- had to uprade spotbugs version to avoid incorrect warning on 'record' equeals method
- convention: added missing 'asserts' in affected testware
- my preference: removed a lot of unnecessary linebreaks in affected testware
- removed redunfant (variation) of a 'delegation' test

Issue-ID: CPS-475
Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
Change-Id: Ie0c9d5ebc33196ae14ed6c226843095a2a040d1d
16 files changed:
cps-dependencies/pom.xml
cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyController.java
cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/handlers/NcmpCachedResourceRequestHandler.java
cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/handlers/NcmpDatastoreRequestHandler.java
cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/handlers/NcmpPassthroughResourceRequestHandler.java
cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/controller/NetworkCmProxyControllerSpec.groovy
cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/controller/handlers/NcmpDatastoreRequestHandlerSpec.groovy
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/NetworkCmProxyDataService.java
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/NetworkCmProxyDataServiceImpl.java
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/operations/DmiDataOperations.java
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/utils/AlternateIdChecker.java
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/models/CmResourceAddress.java [new file with mode: 0644]
cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/NetworkCmProxyDataServiceImplSpec.groovy
cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/operations/DmiDataOperationsSpec.groovy
cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/utils/AlternateIdCheckerSpec.groovy
cps-parent/pom.xml