michael-o commented on code in PR #1043: URL: https://github.com/apache/maven/pull/1043#discussion_r1128707959
########## maven-xml-impl/src/main/java/org/codehaus/plexus/util/xml/Xpp3DomBuilder.java: ########## @@ -62,8 +64,10 @@ public static Xpp3Dom build(Reader reader, boolean trim) throws XmlPullParserExc */ public static Xpp3Dom build(Reader reader, boolean trim, InputLocationBuilder locationBuilder) throws XmlPullParserException, IOException { - return new Xpp3Dom( - XmlNodeBuilder.build(reader, trim, locationBuilder != null ? locationBuilder::toInputLocation : null)); + try (Reader closeMe = reader) { + return new Xpp3Dom(XmlNodeBuilder.build( + reader, trim, locationBuilder != null ? locationBuilder::toInputLocation : null)); + } } Review Comment: These two hunks I don't understand. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org