Sonar Major fix 01/30001/1
authorPooja03 <PM00501616@techmahindra.com>
Thu, 1 Feb 2018 10:41:11 +0000 (16:11 +0530)
committerPooja03 <PM00501616@techmahindra.com>
Thu, 1 Feb 2018 10:43:19 +0000 (16:13 +0530)
resourcePath variable is already a string, there's no need to call toString method

Sonar Link:https://sonar.onap.org/component_issues/index?id=org.onap.dcaegen2.platform%3Ainventory-api#severities=MAJOR|resolved=false|rules=squid%3AS1858

Change-Id: I5470b33aed3c8fd487c4d3687ee6f1d2de77abeb
Location:DatabusControllerClient.java:L51
Issue-ID: DCAEGEN2-296
Signed-off-by: Pooja03 <PM00501616@techmahindra.com>
src/main/java/org/onap/dcae/inventory/clients/DatabusControllerClient.java

index 29330b0..b2429d9 100644 (file)
@@ -48,7 +48,7 @@ public class DatabusControllerClient {
             resourcePath = (new StringBuilder("/")).append(resourcePath).toString();
         }
 
-        return UriBuilder.fromPath(resourcePath.toString()).scheme("https").host(this.connectionConfiguration.getHost())
+        return UriBuilder.fromPath(resourcePath).scheme("https").host(this.connectionConfiguration.getHost())
                 .port(this.connectionConfiguration.getPort()).build();
     }