Skip properties from Java classes for which the getter type is unknown
thus avoiding NPE when auto-generating external serializers. #KT-55681 Fixed
This commit is contained in:
committed by
Space Team
parent
a1894ed027
commit
0b4f534d35
+1
-1
@@ -74,7 +74,7 @@ internal fun serializablePropertiesForIrBackend(
|
||||
if (irClass.isInternalSerializable) !it.annotations.hasAnnotation(SerializationAnnotations.serialTransientFqName)
|
||||
else !DescriptorVisibilities.isPrivate(it.visibility) && ((it.isVar && !it.annotations.hasAnnotation(SerializationAnnotations.serialTransientFqName)) || primaryParamsAsProps.contains(
|
||||
it
|
||||
))
|
||||
)) && it.getter?.returnType != null // For some reason, some properties from Java (like java.net.URL.hostAddress) do not have getter. Let's ignore them, as they never have worked properly in K1 either.
|
||||
|
||||
val (primaryCtorSerializableProps, bodySerializableProps) = properties
|
||||
.asSequence()
|
||||
|
||||
Reference in New Issue
Block a user