mirror of
https://github.com/corda/corda.git
synced 2024-12-23 23:02:29 +00:00
commit
ec726da7d0
@ -68,6 +68,10 @@ sealed class FiberRequest(val topic: String,
|
|||||||
override fun toString(): String {
|
override fun toString(): String {
|
||||||
return "Expecting response via topic ${receiveTopic} of type ${responseTypeName}"
|
return "Expecting response via topic ${receiveTopic} of type ${responseTypeName}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// We have to do an unchecked cast, but unless the serialized form is damaged, this was
|
||||||
|
// correct when the request was instantiated
|
||||||
|
@Suppress("UNCHECKED_CAST")
|
||||||
val responseType: Class<R>
|
val responseType: Class<R>
|
||||||
get() = Class.forName(responseTypeName) as Class<R>
|
get() = Class.forName(responseTypeName) as Class<R>
|
||||||
}
|
}
|
||||||
|
@ -96,7 +96,7 @@ class PerFileCheckpointStorageTests {
|
|||||||
|
|
||||||
private var checkpointCount = 1
|
private var checkpointCount = 1
|
||||||
private val request = FiberRequest.ExpectingResponse("topic", null, random63BitValue(), random63BitValue(), null,
|
private val request = FiberRequest.ExpectingResponse("topic", null, random63BitValue(), random63BitValue(), null,
|
||||||
java.lang.String::class.java)
|
kotlin.String::class.java)
|
||||||
private fun newCheckpoint() = Checkpoint(SerializedBytes(Ints.toByteArray(checkpointCount++)), request)
|
private fun newCheckpoint() = Checkpoint(SerializedBytes(Ints.toByteArray(checkpointCount++)), request)
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user