Fix Sonar Qube Violations - Recurring task 55/126355/1
authorsourabh_sourabh <sourabh.sourabh@est.tech>
Mon, 20 Dec 2021 17:58:49 +0000 (23:28 +0530)
committersourabh_sourabh <sourabh.sourabh@est.tech>
Mon, 20 Dec 2021 17:58:49 +0000 (23:28 +0530)
Issue-ID: CPS-475

Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
Change-Id: I5c10360ec42bc9737ed86140398ef954109275dd

cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyController.java
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/operations/DmiModelOperations.java
cps-service/src/main/java/org/onap/cps/spi/exceptions/DataspaceInUseException.java

index 28bb28c..0ad30f1 100755 (executable)
@@ -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,
index f74616a..20a3309 100644 (file)
@@ -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 =
index 7889301..1416731 100644 (file)
@@ -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;