Parcelable: Give priority to Parcelable type over objects and enums (KT-20021)
This commit is contained in:
committed by
Yan Zhulanow
parent
be3273a933
commit
7b96c9a003
+6
-6
@@ -167,12 +167,6 @@ interface ParcelSerializer {
|
||||
Method("writeException"),
|
||||
Method("readException")))
|
||||
|
||||
// Write at least a nullability byte.
|
||||
// We don't want parcel to be empty in case if all constructor parameters are objects
|
||||
type.isNamedObject() -> NullAwareParcelSerializerWrapper(ObjectParcelSerializer(asmType, type, typeMapper))
|
||||
|
||||
type.isEnum() -> wrapToNullAwareIfNeeded(type, EnumParcelSerializer(asmType))
|
||||
|
||||
asmType.isFileDescriptor() -> wrapToNullAwareIfNeeded(type, NullCompliantObjectParcelSerializer(asmType,
|
||||
Method("writeRawFileDescriptor"),
|
||||
Method("readRawFileDescriptor")))
|
||||
@@ -197,6 +191,12 @@ interface ParcelSerializer {
|
||||
}
|
||||
}
|
||||
|
||||
// Write at least a nullability byte.
|
||||
// We don't want parcel to be empty in case if all constructor parameters are objects
|
||||
type.isNamedObject() -> NullAwareParcelSerializerWrapper(ObjectParcelSerializer(asmType, type, typeMapper))
|
||||
|
||||
type.isEnum() -> wrapToNullAwareIfNeeded(type, EnumParcelSerializer(asmType))
|
||||
|
||||
type.isSerializable() -> NullCompliantObjectParcelSerializer(asmType,
|
||||
Method("writeSerializable", "(Ljava/io/Serializable;)V"),
|
||||
Method("readSerializable", "()Ljava/io/Serializable;"))
|
||||
|
||||
Reference in New Issue
Block a user