elharo commented on code in PR #28: URL: https://github.com/apache/maven-doap-plugin/pull/28#discussion_r1893736713
########## src/test/java/org/apache/maven/plugin/doap/stubs/DoapProjectStub.java: ########## @@ -49,20 +50,13 @@ public class DoapProjectStub extends MavenProjectStub { */ public DoapProjectStub() { MavenXpp3Reader pomReader = new MavenXpp3Reader(); - XmlStreamReader reader = null; - try { - reader = ReaderFactory.newXmlReader(new File( - new File(super.getBasedir(), "/src/test/resources/unit/doap-configuration/"), - "doap-configuration-plugin-config.xml")); + try (XmlStreamReader reader = ReaderFactory.newXmlReader(new File( Review Comment: I don't think it is. This is Plexus. I think the related one in maven-shared-utils might be though. Perhaps the plexus one should be deprecated too, but I don't much touch that code. In any case, this is just moved around here, not added. ########## src/main/java/org/apache/maven/plugin/doap/DoapUtil.java: ########## @@ -472,16 +471,13 @@ public static void fetchURL(Settings settings, URL url) throws IOException { } if ("file".equals(url.getProtocol())) { - InputStream in = null; - try { - in = url.openStream(); - in.close(); - in = null; - } finally { - IOUtil.close(in); + // [ERROR] src/main/java/org/apache/maven/plugin/doap/DoapUtil.java:[474,53] (blocks) EmptyBlock: Empty try + // block. + try (InputStream in = url.openStream()) { + return; + } catch (IOException ex) { + return; Review Comment: I think it just checks that the file exists. -- 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