Remove spurious printlns

This commit is contained in:
Katelyn Baker 2017-08-15 14:18:08 +01:00
parent c72ac2a102
commit 6076d39ee4

View File

@ -35,7 +35,6 @@ internal fun constructorForDeserialization(type: Type): KFunction<Any>? {
val kotlinConstructors = clazz.kotlin.constructors
val hasDefault = kotlinConstructors.any { it.parameters.isEmpty() }
for (kotlinConstructor in kotlinConstructors) {
println (kotlinConstructor)
if (preferredCandidate == null && kotlinConstructors.size == 1 && !hasDefault) {
preferredCandidate = kotlinConstructor
} else if (preferredCandidate == null && kotlinConstructors.size == 2 && hasDefault && kotlinConstructor.parameters.isNotEmpty()) {
@ -45,7 +44,6 @@ internal fun constructorForDeserialization(type: Type): KFunction<Any>? {
throw NotSerializableException("More than one constructor for $clazz is annotated with @CordaConstructor.")
}
preferredCandidate = kotlinConstructor
println (" -> $preferredCandidate")
}
}
return preferredCandidate ?: throw NotSerializableException("No constructor for deserialization found for $clazz.")