Skip to content

Handle SkipDefaultValuesSerializationFilters param deprecation - #529

Open
juan-mora-google wants to merge 2 commits into
flutter:mainfrom
juan-mora-google:chore/jmora/handle-SkipDefaultValuesSerializationFilters-deprecation
Open

Handle SkipDefaultValuesSerializationFilters param deprecation#529
juan-mora-google wants to merge 2 commits into
flutter:mainfrom
juan-mora-google:chore/jmora/handle-SkipDefaultValuesSerializationFilters-deprecation

Conversation

@juan-mora-google

Copy link
Copy Markdown
Contributor

Changes

The override of the writeExternal method was using XmlSerializer.serializeInto, with 3 params, included a new instance of SkipDefaultValuesSerializationFilters which was recently deprecated.

Faster and less disruptive solution was moving from XmlSerializer.serializeInto to XmlSerializer.serialize with just one param, preventing refactors that could potentially break clone() and getParameters() methods.

XmlSerializer.serialize(Object) automatically ignores default and null values, this means it replaces the old work done by SkipDefaultValuesSerializationFilters.

Why was this needed?

JetBrains declared this as deprecated because direct mutation of existing DOM elements causes problems with the modern state system.


  • I’ve reviewed the contributor guide and applied the relevant portions to this PR.
Contribution guidelines:

@google-cla

google-cla Bot commented Jul 23, 2026

Copy link
Copy Markdown

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.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@juan-mora-google
juan-mora-google marked this pull request as ready for review July 24, 2026 18:28
@juan-mora-google
juan-mora-google force-pushed the chore/jmora/handle-SkipDefaultValuesSerializationFilters-deprecation branch from a4f4832 to 9683710 Compare July 28, 2026 20:30
@juan-mora-google
juan-mora-google force-pushed the chore/jmora/handle-SkipDefaultValuesSerializationFilters-deprecation branch from 9683710 to 720f6d9 Compare July 29, 2026 23:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant