efegokdemir commented on code in PR #183:
URL: https://github.com/apache/maven-shared-jar/pull/183#discussion_r4219023525


##########
src/main/java/org/apache/maven/shared/jar/JarAnalyzer.java:
##########
@@ -137,6 +133,16 @@ public void closeQuietly() {
         }
     }
 
+    /**
+     * Close the associated JAR file.
+     *
+     * @throws IOException if an I/O error occurs while closing the JAR file
+     */
+    @Override
+    public void close() throws IOException {
+        jarFile.close();

Review Comment:
   close() propagates IOException per the Closeable contract, so 
try-with-resources preserves close failures. The existing closeQuietly() method 
remains unchanged for callers that need exceptions suppressed.



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