gnodet commented on code in PR #1208: URL: https://github.com/apache/maven/pull/1208#discussion_r1268959818
########## src/mdo/reader-ex.vm: ########## @@ -124,7 +123,7 @@ public class ${className} { * @return ${root.name} */ public ${root.name} read(InputStream in, boolean strict, InputSource source) throws IOException, XmlPullParserException { - return read(ReaderFactory.newXmlReader(in), strict, source); + return read(new XmlStreamReader(in), strict, source); Review Comment: Same here ########## src/mdo/reader-modified.vm: ########## @@ -135,7 +133,7 @@ public class ${className} { * @return ${root.name} */ public ${root.name} read(InputStream in, boolean strict) throws IOException, XmlPullParserException { - return read(ReaderFactory.newXmlReader(in), strict); + return read(new XmlStreamReader(in), strict); Review Comment: ...here... ########## maven-settings-builder/pom.xml: ########## @@ -51,17 +51,19 @@ under the License. <groupId>org.codehaus.plexus</groupId> <artifactId>plexus-interpolation</artifactId> </dependency> - <dependency> - <groupId>org.codehaus.plexus</groupId> - <artifactId>plexus-utils</artifactId> - </dependency> <dependency> <groupId>org.apache.maven</groupId> <artifactId>maven-settings</artifactId> </dependency> <dependency> <groupId>org.codehaus.plexus</groupId> <artifactId>plexus-sec-dispatcher</artifactId> + <exclusions> Review Comment: The latest code depends on plexus-xml, not plexus-utils. ########## src/mdo/reader-modified.vm: ########## @@ -148,7 +146,7 @@ public class ${className} { * @return ${root.name} */ public ${root.name} read(InputStream in) throws IOException, XmlPullParserException { - return read(ReaderFactory.newXmlReader(in)); + return read(new XmlStreamReader(in)); Review Comment: here... ########## src/mdo/reader-ex.vm: ########## @@ -57,7 +57,7 @@ import ${packageModelV4}.InputLocation; #foreach ( $class in $model.allClasses ) import ${packageModelV4}.${class.name}; #end -import org.codehaus.plexus.util.ReaderFactory; +import org.codehaus.plexus.util.xml.XmlStreamReader; Review Comment: We should avoid direct usage of XmlStreamReader and let the parser to its job, passing either the `InputStream` or `Reader`, but not wrapping the object. ########## src/mdo/reader.vm: ########## @@ -131,7 +129,7 @@ public class ${className} { * @return ${root.name} */ public ${root.name} read(InputStream in) throws IOException, XmlPullParserException { - return read(ReaderFactory.newXmlReader(in)); + return read(new XmlStreamReader(in)); Review Comment: here... ########## maven-compat/src/main/java/org/apache/maven/repository/legacy/DefaultWagonManager.java: ########## @@ -25,13 +25,18 @@ import java.io.File; import java.io.IOException; import java.lang.reflect.Method; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.nio.file.StandardOpenOption; import java.security.NoSuchAlgorithmException; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Properties; +import org.apache.commons.io.FileUtils; Review Comment: Can we inline the calls to `FileUtils` to not add a dependency to _commons-io_ ? ########## maven-compat/pom.xml: ########## @@ -93,6 +93,11 @@ under the License. <artifactId>wagon-provider-api</artifactId> </dependency> + <dependency> + <groupId>commons-io</groupId> + <artifactId>commons-io</artifactId> + </dependency> Review Comment: I think it should be possible to inline the references to commons-io so that we actually trim down the list of dependencies and not add a new one... ########## src/mdo/reader.vm: ########## @@ -118,7 +116,7 @@ public class ${className} { * @return ${root.name} */ public ${root.name} read(InputStream in, boolean strict) throws IOException, XmlPullParserException { - return read(ReaderFactory.newXmlReader(in), strict); + return read(new XmlStreamReader(in), strict); Review Comment: here... ########## src/mdo/writer.vm: ########## @@ -58,7 +58,7 @@ import org.apache.maven.internal.xml.XmlNodeBuilder; #foreach ( $class in $model.allClasses ) import ${packageModelV4}.${class.name}; #end -import org.codehaus.plexus.util.ReaderFactory; +import org.codehaus.plexus.util.xml.XmlStreamReader; Review Comment: This import does not seem to be used, to just remove it. -- 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