mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-10-06 06:21:16 +07:00
If you don’t implement “equals” in your sub state class, XmlSerializer cannot check it for defaults. TextDiffSettingsHolder.State.SHARED_SETTINGS = new SharedSettings(); The problem — “new SharedSettings()” is not equals to “new SharedSettings()”. As result, user gets <option name="SHARED_SETTINGS"> <SharedSettings /> </option> even if SkipDefaultValuesSerializationFilters is used. While I dream about Kotlin, I can’t fight anymore against Java-developers. XmlSerializer can throw warning in this case, but to simplify developer life, it will compare objects by serializable fields, but not by reference (if equals is not implemented).