Removed DeserializeAsKotlinObjectDef interface as serialisation of Kotlin objects is now handled automatically

This commit is contained in:
Shams Asari
2017-07-06 15:06:04 +01:00
parent 2b3f6d9701
commit fc97fb2368
6 changed files with 14 additions and 37 deletions

View File

@ -8,7 +8,6 @@ import net.corda.core.messaging.SingleMessageRecipient
import net.corda.core.node.services.DEFAULT_SESSION_ID
import net.corda.core.node.services.PartyInfo
import net.corda.core.serialization.CordaSerializable
import net.corda.core.serialization.DeserializeAsKotlinObjectDef
import net.corda.core.serialization.deserialize
import net.corda.core.serialization.serialize
import org.bouncycastle.asn1.x500.X500Name
@ -229,10 +228,3 @@ object TopicStringValidator {
/** @throws IllegalArgumentException if the given topic contains invalid characters */
fun check(tag: String) = require(regex.matcher(tag).matches())
}
/**
* A general Ack message that conveys no content other than it's presence for use when you want an acknowledgement
* from a recipient. Using [Unit] can be ambiguous as it is similar to [Void] and so could mean no response.
*/
@CordaSerializable
object Ack : DeserializeAsKotlinObjectDef

View File

@ -89,6 +89,7 @@ class StateMachineManager(val serviceHub: ServiceHubInternal,
}
}.build()
// TODO Move this into the blacklist and upgrade the blacklist to allow custom messages
private object AutoCloseableSerialisationDetector : Serializer<AutoCloseable>() {
override fun write(kryo: Kryo, output: Output, closeable: AutoCloseable) {
val message = if (closeable is CloseableIterator<*>) {