Skip to content

Commit

Permalink
remove call to deprecated method (#58)
Browse files Browse the repository at this point in the history
* remove call to deprecated method
  • Loading branch information
elharo authored Jul 20, 2020
1 parent dda9e14 commit 914d975
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
* 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;
Expand Down Expand Up @@ -95,10 +94,10 @@ public static Xpp3Dom build( @WillClose InputStream is, @Nonnull String encoding
* @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();
Expand All @@ -108,10 +107,6 @@ public static Xpp3Dom build( @WillClose Reader reader, boolean trim )
{
throw new XmlPullParserException( e );
}
finally
{
IOUtil.close( reader );
}
}

private static DocHandler parseSax( @Nonnull InputSource inputSource, boolean trim )
Expand Down

0 comments on commit 914d975

Please sign in to comment.