diff --git a/node/src/main/kotlin/net/corda/node/shell/InteractiveShell.kt b/node/src/main/kotlin/net/corda/node/shell/InteractiveShell.kt index ea6779f983..57fb06dee1 100644 --- a/node/src/main/kotlin/net/corda/node/shell/InteractiveShell.kt +++ b/node/src/main/kotlin/net/corda/node/shell/InteractiveShell.kt @@ -528,7 +528,7 @@ object InteractiveShell { return UniqueIdentifier(ids[0], uuid) } //Any other string used as externalId. - return UniqueIdentifier(p.text) + return UniqueIdentifier.fromString(p.text) } } diff --git a/node/src/test/kotlin/net/corda/node/shell/CustomTypeJsonParsingTests.kt b/node/src/test/kotlin/net/corda/node/shell/CustomTypeJsonParsingTests.kt index 1622f839f8..bd9eee844d 100644 --- a/node/src/test/kotlin/net/corda/node/shell/CustomTypeJsonParsingTests.kt +++ b/node/src/test/kotlin/net/corda/node/shell/CustomTypeJsonParsingTests.kt @@ -34,10 +34,11 @@ class CustomTypeJsonParsingTests { @Test fun `Deserializing UniqueIdentifier by parsing string`() { - val json = """{"linearId":"26b37265-a1fd-4c77-b2e0-715917ef619f"}""" + val id = "26b37265-a1fd-4c77-b2e0-715917ef619f" + val json = """{"linearId":"$id"}""" val state = objectMapper.readValue(json) - assertEquals("26b37265-a1fd-4c77-b2e0-715917ef619f", state.linearId.externalId) + assertEquals(id, state.linearId.id.toString()) } @Test