mirror of
https://github.com/corda/corda.git
synced 2025-02-18 16:40:55 +00:00
Fixes a bug in the deserialisation of UniqueIdentifiers in the CRaSH shell.
This commit is contained in:
parent
142f52fa82
commit
5df50c0e81
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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<State>(json)
|
||||
|
||||
assertEquals("26b37265-a1fd-4c77-b2e0-715917ef619f", state.linearId.externalId)
|
||||
assertEquals(id, state.linearId.id.toString())
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Loading…
x
Reference in New Issue
Block a user