aboutsummaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/modules/inbounds/health-api-common
diff options
context:
space:
mode:
authorchandana.g.n <chandana.g.n@accenture.com>2024-10-09 13:17:38 +0000
committerchandana.g.n <chandana.g.n@accenture.com>2024-10-15 07:09:06 +0000
commitb992a32981f459249634daa1dfdeb26b060a4e80 (patch)
treece6f060c0d88aa5a447c4fbdb41bc15efe98314c /ms/blueprintsprocessor/modules/inbounds/health-api-common
parent940a89a0b3e9f69fcb58101d8d4a7ab2763ba715 (diff)
Updated to Java-17
- Updated parent project and fixed security vulnerabilities Issue-ID: CCSDK-4059 Change-Id: Ie02ae86a578dd7732b7a71b6a9e9d3a5997c17b3 Signed-off-by: chandana.g.n <chandana.g.n@accenture.com>
Diffstat (limited to 'ms/blueprintsprocessor/modules/inbounds/health-api-common')
-rw-r--r--ms/blueprintsprocessor/modules/inbounds/health-api-common/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/healthapi/configuration/HealthCheckProperties.kt7
1 files changed, 7 insertions, 0 deletions
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<String>): 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])
)