Skip to content

Comments

added static imports#3211

Merged
lbownik merged 2 commits intodevelopfrom
refactorings_24
Feb 18, 2026
Merged

added static imports#3211
lbownik merged 2 commits intodevelopfrom
refactorings_24

Conversation

@lbownik
Copy link
Contributor

@lbownik lbownik commented Feb 16, 2026

removed unused imports
replaced explicit close in finally with try-with-resources minor optimizations/cleanup
removed useless printStackTrace calls
removed some commented out code

removed unused imports
replaced explicit close in finally with try-with-resources
minor optimizations/cleanup
removed useless printStackTrace calls
removed some commented out code
try (StringReader reader = new StringReader(xmlToParse)){
XMLInputFactory xmlFactory = javax.xml.stream.XMLInputFactory.newInstance();
xmlr = xmlFactory.createXMLStreamReader(reader);
XMLStreamReader xmlr = xmlFactory.createXMLStreamReader(reader);
Copy link
Contributor

Choose a reason for hiding this comment

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

XMLStreamReader is not closed only StringReader is.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed
count not use try-with-resources because XmlStreamReader does not implement AutoCloseable :(

@rscipien rscipien assigned lbownik and unassigned rscipien Feb 17, 2026
@lbownik lbownik assigned rscipien and unassigned lbownik Feb 17, 2026
@lbownik lbownik requested a review from rscipien February 17, 2026 17:41
@rscipien rscipien assigned lbownik and unassigned rscipien Feb 18, 2026
@lbownik lbownik merged commit 0bf02b6 into develop Feb 18, 2026
1 check passed
@lbownik lbownik deleted the refactorings_24 branch February 18, 2026 08:06
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.

2 participants