summaryrefslogtreecommitdiff
path: root/annotations/generate_annotated_java_files.py
diff options
context:
space:
mode:
authorFredrik Roubert <roubert@google.com>2017-07-06 22:53:51 +0200
committerFredrik Roubert <roubert@google.com>2017-07-19 16:24:00 +0200
commitbdb158e71c53e691b5e204da1da893173fc9b83b (patch)
treed297354092cfffbcadbade1e641d31d8a406efac /annotations/generate_annotated_java_files.py
parent8edc87047d41234a75a488077591fdb8cea2db2d (diff)
Fix broken serialization of libcore's DecimalFormat with ICU 59.
Internally, libcore's DecimalFormat uses ICU4J's DecimalFormat but this internal object is not part of the serialized form. Therefore it's necessary for the deserialization code to call the right setters in the right order on ICU4J's DecimalFormat object to make sure that the resulting object ends up being equals() to the one that the object that was serialized had as an internal member. This has become more complex in ICU 59 because of the interaction of the properties and exportedProperties attributes. Calling a setter will make an object no longer equals(), even if the value set is the default value. For more information about this, see: http://bugs.icu-project.org/trac/ticket/13266 For the objects recreated during deserialization to be identical to the corresponding objects that were serialized, libcore's DecimalFormat must work around this. This change updates the deserialization code so that it with both ICU 58 and ICU 59 will create objects that are equals() to the objects that were serialized, for all cases covered by existing unit tests. It does not change the behaviour of DecimalFormat in any other way. (Further work would be needed to also handle objects on which some property before serialization has been explicitly set to a value identical to the default value. This is a use case not covered by current tests.) Test: CtsLibcoreTestCases Change-Id: I025d0327f59c14d668f68a0be54cb1737c395dc5
Diffstat (limited to 'annotations/generate_annotated_java_files.py')
0 files changed, 0 insertions, 0 deletions