mirror of
https://github.com/corda/corda.git
synced 2025-06-17 22:58:19 +00:00
CORDA-2050: Do not add java.lang.Class fields and properties to local type cache. (#5511)
* Fix SLF4J logging for example Gradle project. * Stop adding java.lang.Class's internal fields and properties to the local type cache. This allows us to fix ArraySerializer for the DJVM.
This commit is contained in:
committed by
Rick Parker
parent
650264e092
commit
a9d9b668bc
@ -88,7 +88,9 @@ open class ArraySerializer(override val type: Type, factory: LocalSerializerFact
|
||||
context: SerializationContext
|
||||
): Any {
|
||||
if (obj is List<*>) {
|
||||
return obj.map { input.readObjectOrNull(it, schemas, elementType, context) }.toArrayOfType(elementType)
|
||||
return obj.map {
|
||||
input.readObjectOrNull(redescribe(it, elementType), schemas, elementType, context)
|
||||
}.toArrayOfType(elementType)
|
||||
} else throw AMQPNotSerializableException(type, "Expected a List but found $obj")
|
||||
}
|
||||
|
||||
|
@ -209,7 +209,12 @@ internal data class LocalTypeInformationBuilder(val lookup: LocalTypeLookup,
|
||||
observedType = type,
|
||||
typeIdentifier = typeIdentifier,
|
||||
constructor = null,
|
||||
properties = buildReadOnlyProperties(rawType),
|
||||
properties = if (rawType == Class::class.java) {
|
||||
// Do NOT drill down into the internals of java.lang.Class.
|
||||
emptyMap()
|
||||
} else {
|
||||
buildReadOnlyProperties(rawType)
|
||||
},
|
||||
superclass = superclassInformation,
|
||||
interfaces = interfaceInformation,
|
||||
typeParameters = typeParameterInformation,
|
||||
|
Reference in New Issue
Block a user