Merge "Remove code smell and bug"
[nonrtric.git] / sdnc-a1-controller / northbound / nonrt-ric-api / provider / src / main / java / org / onap / sdnc / northbound / restadapter / NearRicUrlProvider.java
index d45d202..b74d103 100644 (file)
@@ -1,6 +1,6 @@
 /*-
  * ============LICENSE_START=======================================================
- *  Copyright (C) 2019 Nordix Foundation.
+ *  Copyright (C) 2020 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -31,9 +31,6 @@ import org.springframework.web.util.UriComponentsBuilder;
 
 public class NearRicUrlProvider {
 
-  public NearRicUrlProvider() {
-  }
-
   /**
    * Retrieve the base url of the Near-RIC
    *
@@ -88,8 +85,8 @@ public class NearRicUrlProvider {
    * @return the putPolicy url
    */
   public String putPolicyUrl(final String nearRtRicUrl, final String policyId, final String policyTypeId) {
-    return UriComponentsBuilder.fromUriString(policiesUrl(nearRtRicUrl)).pathSegment(policyId)
-            .pathSegment("?policyTypeId=").pathSegment(policyTypeId).build().toString();
+    return UriComponentsBuilder.fromUriString(policiesUrl(nearRtRicUrl))
+            .pathSegment(policyId + "?policyTypeId=" + policyTypeId).build().toString();
   }
 
   /**