elharo commented on code in PR #226:
URL: https://github.com/apache/maven-pmd-plugin/pull/226#discussion_r2134602124


##########
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:
   OK, maybe that's not where it is, but two tests broke for that inobvious 
reason when I initially set this up with try with resources. I had to drop the 
closing to make them pass. 



-- 
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

Reply via email to