Fix sonar issue and upgrade cps.version 91/140191/1
authormpriyank <priyank.maheshwari@est.tech>
Wed, 12 Feb 2025 13:04:17 +0000 (13:04 +0000)
committermpriyank <priyank.maheshwari@est.tech>
Wed, 12 Feb 2025 13:07:28 +0000 (13:07 +0000)
- removed using the deprecated fromHttpUrl method and instead using the
  chained method fromUriString which was anyways called from the
  fromHttpUrl method
- also updated the latest cps version i.e 3.6.0

Issue-ID: CPS-245
Change-Id: I4892f27ceba934db526aab509b9edd0d2367ab6d
Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
dmi-service/src/main/java/org/onap/cps/ncmp/dmi/service/client/NcmpRestClient.java
pom.xml

index 92165ff..18445e5 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  ============LICENSE_START=======================================================
- *  Copyright (C) 2021 Nordix Foundation
+ *  Copyright (C) 2021-2025 Nordix Foundation
  *  ================================================================================
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -57,7 +57,7 @@ public class NcmpRestClient {
 
     private String buildNcmpRegistrationUrl() {
         return UriComponentsBuilder
-            .fromHttpUrl(cpsProperties.getBaseUrl())
+            .fromUriString(cpsProperties.getBaseUrl())
             .path(cpsProperties.getDmiRegistrationUrl())
             .toUriString();
     }
diff --git a/pom.xml b/pom.xml
index b2fc97d..16dc0bf 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
   ============LICENSE_START=======================================================
-  Copyright (c) 2021-2024 Nordix Foundation.
+  Copyright (c) 2021-2025 Nordix Foundation.
   Modifications Copyright (C) 2021 Bell Canada.
   ================================================================================
   Licensed under the Apache License, Version 2.0 (the "License");
@@ -52,7 +52,7 @@
 
         <!-- Project Versioning and Timestamp -->
         <cps.groupId>org.onap.cps</cps.groupId>
-        <cps.version>3.5.5</cps.version>
+        <cps.version>3.6.0</cps.version>
         <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
 
         <!-- Code Quality and Dependency Management -->