Commit fd17eabf authored by Przemyslaw Szczepaniak's avatar Przemyslaw Szczepaniak
Browse files

Fix clinit-related serialization incompatibility.

For the code:
class Parent {
  some code that will create <clinit>
}
class Child extends Parent {}

java.io.ObjectStreamClass.hasStaticInitializer(Child.class)
was returning false. This is technically valid, but historically
android was returning true in this case. This causes
problems with deserializing classes like Child without
explicit serialVersionUID. To mitigate the problem, this
change reverts to old behavior if sdk target <= 23.

Bug: 29064453
Change-Id: Iaff269ced01543469a30b50673a04d3d8722d261
parent a4fcb95b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment