slawekjaranowski commented on code in PR #226: URL: https://github.com/apache/maven-pmd-plugin/pull/226#discussion_r2134600536
########## src/test/java/org/apache/maven/plugins/pmd/stubs/CustomConfigurationMavenProjectStub.java: ########## @@ -40,35 +41,26 @@ public class CustomConfigurationMavenProjectStub extends PmdProjectStub { private List<ReportPlugin> reportPlugins = new ArrayList<>(); - public CustomConfigurationMavenProjectStub() { + public CustomConfigurationMavenProjectStub() throws IOException, XmlPullParserException { MavenXpp3Reader pomReader = new MavenXpp3Reader(); - Model model = null; - try (InputStream is = new FileInputStream(new File(getBasedir() + "/" + getPOM()))) { - model = pomReader.read(is); - setModel(model); - } catch (Exception e) { - } + InputStream in = new FileInputStream(getBasedir() + "/" + getPOM()); Review Comment: In my test stream is still open after `pomReader.read(is)`, can you show code where is closed in `pomReader.read(is)` -- 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