From b992a32981f459249634daa1dfdeb26b060a4e80 Mon Sep 17 00:00:00 2001 From: "chandana.g.n" Date: Wed, 9 Oct 2024 13:17:38 +0000 Subject: Updated to Java-17 - Updated parent project and fixed security vulnerabilities Issue-ID: CCSDK-4059 Change-Id: Ie02ae86a578dd7732b7a71b6a9e9d3a5997c17b3 Signed-off-by: chandana.g.n --- .../healthapi/configuration/HealthCheckProperties.kt | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'ms/blueprintsprocessor/modules/inbounds/health-api-common') diff --git a/ms/blueprintsprocessor/modules/inbounds/health-api-common/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/healthapi/configuration/HealthCheckProperties.kt b/ms/blueprintsprocessor/modules/inbounds/health-api-common/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/healthapi/configuration/HealthCheckProperties.kt index c1532cd35..dfbacdbd3 100644 --- a/ms/blueprintsprocessor/modules/inbounds/health-api-common/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/healthapi/configuration/HealthCheckProperties.kt +++ b/ms/blueprintsprocessor/modules/inbounds/health-api-common/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/healthapi/configuration/HealthCheckProperties.kt @@ -77,6 +77,13 @@ open class HealthCheckProperties { } private fun getServiceEndpoint(serviceEndpointInfo: List): ServiceEndpoint { + // Ensure the list has at least 2 elements + if (serviceEndpointInfo.size < 2) { + // Use default values if the list is too short + return ServiceEndpoint("", "") + } + + // Safely access elements assuming the list has at least 2 elements return ServiceEndpoint( removeSpecialCharacter(serviceEndpointInfo[0]), removeSpecialCharacter(serviceEndpointInfo[1]) ) -- cgit 1.2.3-korg