Skip to content

Fix DefaultSettingsXmlFactory.write() always emitting location comments#11924

Open
utafrali wants to merge 1 commit intoapache:masterfrom
utafrali:fix/issue-11899-settings-location-comments
Open

Fix DefaultSettingsXmlFactory.write() always emitting location comments#11924
utafrali wants to merge 1 commit intoapache:masterfrom
utafrali:fix/issue-11899-settings-location-comments

Conversation

@utafrali
Copy link
Copy Markdown

Aligns DefaultSettingsXmlFactory.write() with the existing pattern in DefaultModelXmlFactory.write(). The writer now defaults to addLocationInformation = false and only enables it when an InputLocationFormatter is provided in the request.

Previously the SettingsStaxWriter constructor defaulted addLocationInformation to true, so every serialized settings document included location tracking comments regardless of whether a formatter was configured.

Closes #11899

Mirror the pattern from DefaultModelXmlFactory.write() to disable
location information by default and only enable it when an
InputLocationFormatter is provided via the request.

Closes apache#11899
@jhobertextra
Copy link
Copy Markdown

@utafrali Hi! Thanks a lot for opening this pull request. I really appreciate the effort. Before moving forward, could you add unit tests to cover the changes? That helps ensure the update behaves as expected.

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.

DefaultSettingsXmlFactory.write() Always Emits Location Comments

2 participants