diff --git a/core/src/main/kotlin/net/corda/core/utilities/UntrustworthyData.kt b/core/src/main/kotlin/net/corda/core/utilities/UntrustworthyData.kt index 48ecc3da4e..7363f03e1b 100644 --- a/core/src/main/kotlin/net/corda/core/utilities/UntrustworthyData.kt +++ b/core/src/main/kotlin/net/corda/core/utilities/UntrustworthyData.kt @@ -2,6 +2,7 @@ package net.corda.core.utilities import co.paralleluniverse.fibers.Suspendable import net.corda.core.flows.FlowException +import java.io.Serializable /** * A small utility to approximate taint tracking: if a method gives you back one of these, it means the data came from @@ -27,7 +28,7 @@ class UntrustworthyData(private val fromUntrustedWorld: T) { @Deprecated("This old name was confusing, use unwrap instead", replaceWith = ReplaceWith("unwrap")) inline fun validate(validator: (T) -> R) = validator(data) - interface Validator { + interface Validator : Serializable { @Suspendable @Throws(FlowException::class) fun validate(data: T): R