gnodet commented on code in PR #2326: URL: https://github.com/apache/maven/pull/2326#discussion_r2094547990
########## impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultPluginXmlFactory.java: ########## @@ -38,65 +37,63 @@ import org.apache.maven.plugin.descriptor.io.PluginDescriptorStaxReader; import org.apache.maven.plugin.descriptor.io.PluginDescriptorStaxWriter; -import static org.apache.maven.impl.ImplUtils.nonNull; import static org.apache.maven.impl.StaxLocation.getLocation; import static org.apache.maven.impl.StaxLocation.getMessage; @Named @Singleton public class DefaultPluginXmlFactory implements PluginXmlFactory { + @Override public PluginDescriptor read(@Nonnull XmlReaderRequest request) throws XmlReaderException { - nonNull(request, "request"); - Path path = request.getPath(); - URL url = request.getURL(); - Reader reader = request.getReader(); - InputStream inputStream = request.getInputStream(); - if (path == null && url == null && reader == null && inputStream == null) { - throw new IllegalArgumentException("path, url, reader or inputStream must be non null"); - } + return read(request, setAddDefaultEntities(request, new PluginDescriptorStaxReader())); + } + + @Override + public void write(XmlWriterRequest<PluginDescriptor> request) throws XmlWriterException { Review Comment: Agreed, but in that case, the PR is off-topic and maybe the point is to rename the interfaces. -- 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