CORDA-540: AMQP-forge "example-code" (#1439)

This commit is contained in:
Viktor Kolomeyko 2017-09-07 11:17:55 +01:00 committed by GitHub
parent 916c25508e
commit 50c51493c3
2 changed files with 3 additions and 5 deletions

View File

@ -30,7 +30,7 @@ enum class WorkflowState {
* Minimal contract to encode a simple workflow with one initial state and two possible eventual states.
* It is assumed one party unilaterally submits and the other manually retrieves the deal and completes it.
*/
data class TradeApprovalContract(private val blank: Void? = null) : Contract {
data class TradeApprovalContract(val blank: Unit? = null) : Contract {
interface Commands : CommandData {
class Issue : TypeOnlyCommandData(), Commands // Record receipt of deal details

View File

@ -7,10 +7,7 @@ import net.corda.core.serialization.CordaSerializable
import net.corda.nodeapi.internal.serialization.carpenter.*
import org.apache.qpid.proton.amqp.*
import java.io.NotSerializableException
import java.lang.reflect.GenericArrayType
import java.lang.reflect.ParameterizedType
import java.lang.reflect.Type
import java.lang.reflect.WildcardType
import java.lang.reflect.*
import java.util.*
import java.util.concurrent.ConcurrentHashMap
import java.util.concurrent.CopyOnWriteArrayList
@ -346,6 +343,7 @@ class SerializerFactory(val whitelist: ClassWhitelist, cl: ClassLoader) {
is ParameterizedType -> "${nameForType(type.rawType)}<${type.actualTypeArguments.joinToString { nameForType(it) }}>"
is GenericArrayType -> "${nameForType(type.genericComponentType)}[]"
is WildcardType -> "Any"
is TypeVariable<*> -> "?"
else -> throw NotSerializableException("Unable to render type $type to a string.")
}