elharo commented on code in PR #28:
URL: https://github.com/apache/maven-doap-plugin/pull/28#discussion_r1886952613


##########
src/main/java/org/apache/maven/plugin/doap/DoapUtil.java:
##########
@@ -688,24 +684,18 @@ private static String getLowerCaseString(I18N i18n, 
String key) {
      */
     private static String getPluginVersion() {
         Properties pomProperties = new Properties();
-        InputStream is = null;
-        try {
-            is = DoapUtil.class.getResourceAsStream(
-                    "/META-INF/maven/org.apache.maven.plugins/" + 
"maven-doap-plugin/pom.properties");
+
+        try (InputStream is = DoapUtil.class.getResourceAsStream(

Review Comment:
   If you mean in the implicit finally block, don't think so. That's one of the 
things try with resources handles. It doesn't invoke on null.
   
   
https://stackoverflow.com/questions/35372148/try-with-resource-when-autocloseable-is-null
   
   If you see a an exception on some other path, I'm not seeing it yet.



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