aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsourabh_sourabh <sourabh.sourabh@est.tech>2021-12-20 23:28:49 +0530
committersourabh_sourabh <sourabh.sourabh@est.tech>2021-12-20 23:28:49 +0530
commit23bd18865486d334647a4928104acce625795e18 (patch)
tree10d21b6413c4a7a553c10110bfd6c9a770e17795
parent8d82a07ce860ab4e8626f0c2209c80cb4fdfa5eb (diff)
Fix Sonar Qube Violations - Recurring task
Issue-ID: CPS-475 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Change-Id: I5c10360ec42bc9737ed86140398ef954109275dd
-rwxr-xr-xcps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyController.java6
-rw-r--r--cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/operations/DmiModelOperations.java4
-rw-r--r--cps-service/src/main/java/org/onap/cps/spi/exceptions/DataspaceInUseException.java2
3 files changed, 9 insertions, 3 deletions
diff --git a/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyController.java b/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyController.java
index 28bb28ce85..0ad30f19c1 100755
--- a/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyController.java
+++ b/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyController.java
@@ -78,6 +78,7 @@ public class NetworkCmProxyController implements NetworkCmProxyApi {
* Create Node.
* @deprecated This Method is no longer used as part of NCMP.
*/
+ // All deprecated APIs methods will be address into https://jira.onap.org/browse/CPS-642
@Override
@Deprecated(forRemoval = false)
public ResponseEntity<Void> createNode(final String cmHandle, @Valid final Object jsonData,
@@ -90,6 +91,7 @@ public class NetworkCmProxyController implements NetworkCmProxyApi {
* Add List-node Child Element.
* @deprecated This Method is no longer used as part of NCMP.
*/
+ // All deprecated APIs methods will be address into https://jira.onap.org/browse/CPS-642
@Override
@Deprecated(forRemoval = false)
public ResponseEntity<Void> addListNodeElements(@NotNull @Valid final String parentNodeXpath,
@@ -102,6 +104,7 @@ public class NetworkCmProxyController implements NetworkCmProxyApi {
* Get Node By CM Handle and X-Path.
* @deprecated This Method is no longer used as part of NCMP.
*/
+ // All deprecated APIs methods will be address into https://jira.onap.org/browse/CPS-642
@Override
@Deprecated(forRemoval = false)
public ResponseEntity<Object> getNodeByCmHandleAndXpath(final String cmHandle, @Valid final String xpath,
@@ -116,6 +119,7 @@ public class NetworkCmProxyController implements NetworkCmProxyApi {
* Query Data Nodes.
* @deprecated This Method is no longer used as part of NCMP.
*/
+ // All deprecated APIs methods will be address into https://jira.onap.org/browse/CPS-642
@Override
@Deprecated(forRemoval = false)
public ResponseEntity<Object> queryNodesByCmHandleAndCpsPath(final String cmHandle, @Valid final String cpsPath,
@@ -131,6 +135,7 @@ public class NetworkCmProxyController implements NetworkCmProxyApi {
* Replace Node With Descendants.
* @deprecated This Method is no longer used as part of NCMP.
*/
+ // All deprecated APIs methods will be address into https://jira.onap.org/browse/CPS-642
@Override
@Deprecated(forRemoval = false)
public ResponseEntity<Object> replaceNode(final String cmHandle, @Valid final Object jsonData,
@@ -143,6 +148,7 @@ public class NetworkCmProxyController implements NetworkCmProxyApi {
* Update Node Leaves.
* @deprecated This Method is no longer used as part of NCMP.
*/
+ // All deprecated APIs methods will be address into https://jira.onap.org/browse/CPS-642
@Override
@Deprecated(forRemoval = false)
public ResponseEntity<Object> updateNodeLeaves(final String cmHandle, @Valid final Object jsonData,
diff --git a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/operations/DmiModelOperations.java b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/operations/DmiModelOperations.java
index f74616ab30..20a3309d01 100644
--- a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/operations/DmiModelOperations.java
+++ b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/operations/DmiModelOperations.java
@@ -136,11 +136,11 @@ public class DmiModelOperations extends DmiOperations {
return asJsonObject;
}
- private List<ModuleReference> toModuleReferences(final Map dmiFetchModulesResponseAsMap) {
+ private List<ModuleReference> toModuleReferences(final Map<String, Object> dmiFetchModulesResponseAsMap) {
final List<ModuleReference> moduleReferences = new ArrayList<>();
if (dmiFetchModulesResponseAsMap != null) {
- final List moduleReferencesAsList = (List) dmiFetchModulesResponseAsMap.get("schemas");
+ final List<Object> moduleReferencesAsList = (List) dmiFetchModulesResponseAsMap.get("schemas");
if (moduleReferencesAsList != null) {
moduleReferencesAsList.forEach(moduleReferenceAsMap -> {
final ModuleReference moduleReference =
diff --git a/cps-service/src/main/java/org/onap/cps/spi/exceptions/DataspaceInUseException.java b/cps-service/src/main/java/org/onap/cps/spi/exceptions/DataspaceInUseException.java
index 7889301dd2..14167315f8 100644
--- a/cps-service/src/main/java/org/onap/cps/spi/exceptions/DataspaceInUseException.java
+++ b/cps-service/src/main/java/org/onap/cps/spi/exceptions/DataspaceInUseException.java
@@ -23,7 +23,7 @@ package org.onap.cps.spi.exceptions;
* Runtime exception.
* Thrown when given dataspace name is rejected to be deleted because it has anchor or schemasets associated.
*/
-
+@SuppressWarnings("squid:S110") // Team agreed to accept 6 levels of inheritance for CPS Exceptions
public class DataspaceInUseException extends DataInUseException {
private static final long serialVersionUID = 4531370947720760347L;