This is an automated email from the ASF dual-hosted git repository. elharo pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/maven-shared-utils.git
The following commit(s) were added to refs/heads/master by this push: new 914d975 remove call to deprecated method (#58) 914d975 is described below commit 914d9755b157f337dfb76e90f6b0331f834096d6 Author: Elliotte Rusty Harold <elh...@users.noreply.github.com> AuthorDate: Mon Jul 20 12:57:03 2020 +0000 remove call to deprecated method (#58) * remove call to deprecated method --- .../java/org/apache/maven/shared/utils/xml/Xpp3DomBuilder.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/main/java/org/apache/maven/shared/utils/xml/Xpp3DomBuilder.java b/src/main/java/org/apache/maven/shared/utils/xml/Xpp3DomBuilder.java index bfa77f3..00f6f0b 100644 --- a/src/main/java/org/apache/maven/shared/utils/xml/Xpp3DomBuilder.java +++ b/src/main/java/org/apache/maven/shared/utils/xml/Xpp3DomBuilder.java @@ -19,7 +19,6 @@ package org.apache.maven.shared.utils.xml; * under the License. */ -import org.apache.maven.shared.utils.io.IOUtil; import org.apache.maven.shared.utils.xml.pull.XmlPullParserException; import org.xml.sax.Attributes; import org.xml.sax.InputSource; @@ -95,10 +94,10 @@ public class Xpp3DomBuilder * @return the built dom * @throws XmlPullParserException in case of an error */ - public static Xpp3Dom build( @WillClose Reader reader, boolean trim ) + public static Xpp3Dom build( @WillClose Reader in, boolean trim ) throws XmlPullParserException { - try + try ( Reader reader = in ) { DocHandler docHandler = parseSax( new InputSource( reader ), trim ); reader.close(); @@ -108,10 +107,6 @@ public class Xpp3DomBuilder { throw new XmlPullParserException( e ); } - finally - { - IOUtil.close( reader ); - } } private static DocHandler parseSax( @Nonnull InputSource inputSource, boolean trim )