From 10164a7ab851859bfd548e32b4fe3c0610f3d614 Mon Sep 17 00:00:00 2001 From: ottero Date: Tue, 26 Mar 2019 14:40:01 +0000 Subject: Implementing the requested improvements Addressing comments done in https://gerrit.onap.org/r/#/c/82315/ and in the subsequent CDS weekly call. (Resubmitting patch done on previous repo, https://gerrit.onap.org/r/#/c/83063/) Change-Id: I6f948dedf972c33ea6fe0f65884f23cd48adcfba Issue-ID: CCSDK-926 Signed-off-by: ottero --- .../rest/service/BasicAuthRestClientService.kt | 2 -- .../rest/service/BlueprintWebClientService.kt | 9 +-------- .../rest/service/TokenAuthRestClientService.kt | 2 -- .../blueprintsprocessor/rest/service/RestClientServiceTest.kt | 2 -- 4 files changed, 1 insertion(+), 14 deletions(-) (limited to 'ms/blueprintsprocessor/modules/commons/rest-lib/src') diff --git a/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BasicAuthRestClientService.kt b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BasicAuthRestClientService.kt index 7737fd1a5..67dbd0d72 100644 --- a/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BasicAuthRestClientService.kt +++ b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BasicAuthRestClientService.kt @@ -12,8 +12,6 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * - * SPDX-License-Identifier: Apache-2.0 */ package org.onap.ccsdk.cds.blueprintsprocessor.rest.service diff --git a/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BlueprintWebClientService.kt b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BlueprintWebClientService.kt index b34d66d19..94a575397 100644 --- a/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BlueprintWebClientService.kt +++ b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BlueprintWebClientService.kt @@ -12,8 +12,6 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * - * SPDX-License-Identifier: Apache-2.0 */ package org.onap.ccsdk.cds.blueprintsprocessor.rest.service @@ -59,12 +57,7 @@ interface BlueprintWebClientService { } fun convertToBasicHeaders(headers: Map): Array { - val convertedHeaders = Array(headers.size){ BasicHeader("","") } - var currentElement = 0 - for ((name, value) in headers) { - convertedHeaders[currentElement++] = BasicHeader(name, value) - } - return convertedHeaders + return headers.map{ BasicHeader(it.key, it.value)}.toTypedArray() } fun delete(path: String, headers: Array): String { diff --git a/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/TokenAuthRestClientService.kt b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/TokenAuthRestClientService.kt index 609267eb9..6f81ee1a8 100644 --- a/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/TokenAuthRestClientService.kt +++ b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/TokenAuthRestClientService.kt @@ -12,8 +12,6 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * - * SPDX-License-Identifier: Apache-2.0 */ package org.onap.ccsdk.cds.blueprintsprocessor.rest.service diff --git a/ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/RestClientServiceTest.kt b/ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/RestClientServiceTest.kt index 6da59399e..a02a8083b 100644 --- a/ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/RestClientServiceTest.kt +++ b/ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/RestClientServiceTest.kt @@ -13,8 +13,6 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * - * SPDX-License-Identifier: Apache-2.0 */ package org.onap.ccsdk.cds.blueprintsprocessor.rest.service -- cgit 1.2.3-korg