From 74179a3ff5cff14ed78c873277e67212d513c3f4 Mon Sep 17 00:00:00 2001
From: Arshad Mahmood <1391251+arshadm@users.noreply.github.com>
Date: Thu, 21 Dec 2023 15:44:14 +0000
Subject: [PATCH] ENT-11316 Fix test failure due issue in Kotlin 1.9 type
 inference

---
 .../kotlin/net/corda/nodeapi/internal/config/ConfigUtilities.kt | 2 +-
 .../net/corda/nodeapi/internal/config/ConfigParsingTest.kt      | 2 --
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/node-api/src/main/kotlin/net/corda/nodeapi/internal/config/ConfigUtilities.kt b/node-api/src/main/kotlin/net/corda/nodeapi/internal/config/ConfigUtilities.kt
index 5055f9d4c6..6cbfb9936a 100644
--- a/node-api/src/main/kotlin/net/corda/nodeapi/internal/config/ConfigUtilities.kt
+++ b/node-api/src/main/kotlin/net/corda/nodeapi/internal/config/ConfigUtilities.kt
@@ -188,7 +188,7 @@ private fun Config.getSingleValue(
             X500Principal::class -> X500Principal(getString(path))
             CordaX500Name::class -> {
                 when (getValue(path).valueType()) {
-                    ConfigValueType.OBJECT -> getConfig(path).parseAs(onUnknownKeys)
+                    ConfigValueType.OBJECT -> getConfig(path).parseAs(onUnknownKeys) as CordaX500Name
                     else -> CordaX500Name.parse(getString(path))
                 }
             }
diff --git a/node-api/src/test/kotlin/net/corda/nodeapi/internal/config/ConfigParsingTest.kt b/node-api/src/test/kotlin/net/corda/nodeapi/internal/config/ConfigParsingTest.kt
index db749c93cc..27f92456b1 100644
--- a/node-api/src/test/kotlin/net/corda/nodeapi/internal/config/ConfigParsingTest.kt
+++ b/node-api/src/test/kotlin/net/corda/nodeapi/internal/config/ConfigParsingTest.kt
@@ -10,7 +10,6 @@ import net.corda.core.utilities.NetworkHostAndPort
 import org.assertj.core.api.Assertions.assertThat
 import org.assertj.core.api.Assertions.assertThatExceptionOfType
 import org.assertj.core.api.Assertions.assertThatThrownBy
-import org.junit.Ignore
 import org.junit.Test
 import java.net.URL
 import java.nio.file.Path
@@ -109,7 +108,6 @@ class ConfigParsingTest {
     }
 
     @Test(timeout=300_000)
-    @Ignore("TODO JDK17: Fixme")
 	fun `test CordaX500Name`() {
         val name1 = CordaX500Name(organisation = "Mock Party", locality = "London", country = "GB")
         testPropertyType<CordaX500NameData, CordaX500NameListData, CordaX500Name>(