mirror of
https://github.com/corda/corda.git
synced 2024-12-18 20:47:57 +00:00
ENT-12276: Exception now takes a string not a Method object, which wa… (#7834)
* ENT-12276: Exception now takes a string not a Method object, which was causing problems in Jackson parsing.
This commit is contained in:
parent
088846f428
commit
babaceab5d
@ -14,7 +14,6 @@ import org.objectweb.asm.Opcodes.*
|
||||
import org.objectweb.asm.Type
|
||||
import java.lang.Character.isJavaIdentifierPart
|
||||
import java.lang.Character.isJavaIdentifierStart
|
||||
import java.lang.reflect.Method
|
||||
|
||||
/**
|
||||
* Any object that implements this interface is expected to expose its own fields via the [get] method, exactly
|
||||
@ -44,8 +43,8 @@ class CarpenterClassLoader(private val parentClassLoader: ClassLoader = Thread.c
|
||||
}
|
||||
}
|
||||
|
||||
class InterfaceMismatchNonGetterException(val clazz: Class<*>, val method: Method) : InterfaceMismatchException(
|
||||
"Requested interfaces must consist only of methods that start with 'get': ${clazz.name}.${method.name}")
|
||||
class InterfaceMismatchNonGetterException(val clazz: Class<*>, val methodName: String) : InterfaceMismatchException(
|
||||
"Requested interfaces must consist only of methods that start with 'get': ${clazz.name}.${methodName}")
|
||||
|
||||
class InterfaceMismatchMissingAMQPFieldException(val clazz: Class<*>, val field: String) : InterfaceMismatchException(
|
||||
"Interface ${clazz.name} requires a field named $field but that isn't found in the schema or any superclass schemas")
|
||||
@ -459,7 +458,7 @@ class ClassCarpenterImpl @JvmOverloads constructor (override val whitelist: Clas
|
||||
logger.debug { "Ignoring interface $method which is not a getter" }
|
||||
continue@methodLoop
|
||||
} else {
|
||||
throw InterfaceMismatchNonGetterException(itf, method)
|
||||
throw InterfaceMismatchNonGetterException(itf, method.name)
|
||||
}
|
||||
|
||||
// If we're trying to carpent a class that prior to serialisation / deserialization
|
||||
|
Loading…
Reference in New Issue
Block a user