Skip to content

RAT-539: Update xml writer#627

Open
Claudenw wants to merge 19 commits intomasterfrom
update-XMLWriter
Open

RAT-539: Update xml writer#627
Claudenw wants to merge 19 commits intomasterfrom
update-XMLWriter

Conversation

@Claudenw
Copy link
Copy Markdown
Contributor

@Claudenw Claudenw commented Mar 8, 2026

Update the XmlWriter to write to any appendable.
Move the XMLChar class to its own file and use the implementation for Xerces-j to pick up fixes.

Closes RAT-539

@Claudenw Claudenw self-assigned this Mar 9, 2026
Copy link
Copy Markdown
Contributor

@ottlinger ottlinger left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM - all sonarcloud warnings seem reasonable and should be applied before merging.

Besides I was just wonderung if more tests are needed to cover more of the corner cases that XmlWriter handles.

Thanks for all your work!

@Override
public void close() throws IOException {
closeDocument();
if (appendable instanceof Closeable) {
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.

        if (appendable instanceof Closeable) {

Sonarcloud's suggestion seems reasonable to me .... would you mind changing?

import static org.junit.jupiter.api.Assertions.assertTrue;


public class XmlWriterTest {
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.

While scanning the changes in the writer package I wondered if there's enough code coverage for the special cases handled in XmlWriter or if more tests could be added (I only look at the code from the GitHub UI and not in an IDE).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

XMLWriter has 95.2% code coverage. I think we handle most of the cases.

@Claudenw Claudenw requested a review from ottlinger March 22, 2026 09:43
@Claudenw
Copy link
Copy Markdown
Contributor Author

@ottlinger I think this PR is ready now.

@ottlinger ottlinger changed the title Update xml writer RAT-539: Update xml writer Mar 23, 2026
@ottlinger
Copy link
Copy Markdown
Contributor

@Claudenw feel free to merge this PR if the buikld goes through. Thanks.

@sonarqubecloud
Copy link
Copy Markdown

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.

3 participants