Cleaned up logging for registration data
This commit is contained in:
parent
312cf036ed
commit
ab69c21774
@ -163,10 +163,6 @@ object RmiUtils {
|
|||||||
overwrittenMethod = getOverwriteMethodWithConnectionParam(implMethods, method)
|
overwrittenMethod = getOverwriteMethodWithConnectionParam(implMethods, method)
|
||||||
|
|
||||||
if (overwrittenMethod != null) {
|
if (overwrittenMethod != null) {
|
||||||
logger.trace {
|
|
||||||
"Overridden method: $impl.${method.name}"
|
|
||||||
}
|
|
||||||
|
|
||||||
// still might be null!
|
// still might be null!
|
||||||
iface_OR_ImplMethodAccess = implAsmMethodAccess
|
iface_OR_ImplMethodAccess = implAsmMethodAccess
|
||||||
}
|
}
|
||||||
@ -207,6 +203,12 @@ object RmiUtils {
|
|||||||
cachedMethod.overriddenMethod = overwrittenMethod
|
cachedMethod.overriddenMethod = overwrittenMethod
|
||||||
|
|
||||||
cachedMethods[i] = cachedMethod
|
cachedMethods[i] = cachedMethod
|
||||||
|
|
||||||
|
|
||||||
|
if (overwrittenMethod != null && logger.isTraceEnabled) {
|
||||||
|
logger.trace("Overridden method: ${makeFancyMethodName(cachedMethod)}")
|
||||||
|
logger.trace(" to method: ${makeFancyMethodName(overwrittenMethod)}")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// force the type, because we KNOW it is ok to do so
|
// force the type, because we KNOW it is ok to do so
|
||||||
@ -444,8 +446,8 @@ object RmiUtils {
|
|||||||
return packedInt.toUShort().toInt()
|
return packedInt.toUShort().toInt()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun makeFancyMethodName(cachedMethod: CachedMethod): String {
|
fun makeFancyMethodName(method: CachedMethod): String {
|
||||||
val parameterTypes = cachedMethod.method.parameterTypes
|
val parameterTypes = method.method.parameterTypes
|
||||||
val size = parameterTypes.size
|
val size = parameterTypes.size
|
||||||
val args: String = if (size == 0 || parameterTypes[size - 1] == Continuation::class.java) {
|
val args: String = if (size == 0 || parameterTypes[size - 1] == Continuation::class.java) {
|
||||||
""
|
""
|
||||||
@ -453,13 +455,13 @@ object RmiUtils {
|
|||||||
parameterTypes.joinToString { it.simpleName }
|
parameterTypes.joinToString { it.simpleName }
|
||||||
}
|
}
|
||||||
|
|
||||||
return "${cachedMethod.method.declaringClass.name}.${cachedMethod.method.name}($args)"
|
return "${method.method.declaringClass.name}.${method.method.name}($args)"
|
||||||
}
|
}
|
||||||
|
|
||||||
fun makeFancyMethodName(method: Method): String {
|
fun makeFancyMethodName(method: Method): String {
|
||||||
val parameterTypes = method.parameterTypes
|
val parameterTypes = method.parameterTypes
|
||||||
val size = parameterTypes.size
|
val size = parameterTypes.size
|
||||||
val args: String = if (size != 0 || parameterTypes[size - 1] == Continuation::class.java) {
|
val args: String = if (size == 0 || parameterTypes[size - 1] == Continuation::class.java) {
|
||||||
""
|
""
|
||||||
} else {
|
} else {
|
||||||
parameterTypes.joinToString { it.simpleName }
|
parameterTypes.joinToString { it.simpleName }
|
||||||
|
@ -381,9 +381,16 @@ class Serialization(private val references: Boolean,
|
|||||||
|
|
||||||
// now create the registration details, used to validate that the client/server have the EXACT same class registration setup
|
// now create the registration details, used to validate that the client/server have the EXACT same class registration setup
|
||||||
val registrationDetails = arrayListOf<Array<Any>>()
|
val registrationDetails = arrayListOf<Array<Any>>()
|
||||||
|
|
||||||
|
if (logger.isTraceEnabled) {
|
||||||
|
// log the in-order output first
|
||||||
classesToRegister.forEach { classRegistration ->
|
classesToRegister.forEach { classRegistration ->
|
||||||
classRegistration.log(logger)
|
classRegistration.log(logger)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
classesToRegister.forEach { classRegistration ->
|
||||||
// now save all of the registration IDs for quick verification/access
|
// now save all of the registration IDs for quick verification/access
|
||||||
registrationDetails.add(classRegistration.getInfoArray())
|
registrationDetails.add(classRegistration.getInfoArray())
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user