Avoid serializing non-serializable properties (EA-253232)

This commit is contained in:
Yan Zhulanow
2021-02-17 21:53:29 +09:00
parent 0fb57d7253
commit 69fedd9791
@@ -76,7 +76,8 @@ open class PropertiesCollection(protected var properties: Map<Key<*>, Any?> = em
fun entries(): Set<Map.Entry<Key<*>, Any?>> = properties.entries
val notTransientData: Map<Key<*>, Any?> get() = properties.filterKeys { it !is TransientKey<*> }
val notTransientData: Map<Key<*>, Any?>
get() = properties.filter { (key, value) -> key !is TransientKey<*> && value is Serializable }
fun isEmpty(): Boolean = properties.isEmpty()