elharo commented on code in PR #424:
URL: 
https://github.com/apache/maven-shared-utils/pull/424#discussion_r3978411505


##########
src/main/java/org/apache/maven/shared/utils/PropertyUtils.java:
##########
@@ -168,9 +164,8 @@ public static Properties loadOptionalProperties(final 
@Nullable InputStream inpu
         Properties properties = new Properties();
 
         if (inputStream != null) {
-            try (InputStream in = inputStream) // reassign inputStream to 
autoclose
-            {
-                properties.load(in);
+            try {
+                properties.load(inputStream);
             } catch (IllegalArgumentException | IOException ex) {
                 // ignore and return empty properties

Review Comment:
   The real problem might be here. Failure to read properties due to I/O errors 
should be an exception. We shouldn't just return empty properties



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to