Handle SkipDefaultValuesSerializationFilters param deprecation - #529
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
There was a problem hiding this comment.
Code Review
This pull request updates the serialization logic in DartWebdevConfiguration.java by replacing the deprecated SkipDefaultValuesSerializationFilters with manual serialization and copying of attributes. It also fixes a minor typo in a comment. The reviewer suggests using SkipDefaultsSerializationFilter as a direct, non-deprecated replacement to maintain clean, single-line serialization and avoid manual DOM manipulation.
a4f4832 to
9683710
Compare
9683710 to
720f6d9
Compare
Changes
The override of the
writeExternalmethod was usingXmlSerializer.serializeInto, with 3 params, included a new instance ofSkipDefaultValuesSerializationFilterswhich was recently deprecated.Faster and less disruptive solution was moving from
XmlSerializer.serializeIntotoXmlSerializer.serializewith just one param, preventing refactors that could potentially breakclone()andgetParameters()methods.XmlSerializer.serialize(Object)automatically ignores default and null values, this means it replaces the old work done bySkipDefaultValuesSerializationFilters.Why was this needed?
JetBrains declared this as deprecated because direct mutation of existing DOM elements causes problems with the modern state system.
Contribution guidelines:
dart format.