efegokdemir opened a new pull request, #183:
URL: https://github.com/apache/maven-shared-jar/pull/183

   Closes #181.
   
   `JarAnalyzer` owns an open `JarFile` but previously exposed only 
`closeQuietly()`, which prevents callers from using standard try-with-resources 
cleanup while preserving close errors. This change implements `Closeable`, adds 
`close()` that delegates to the owned JAR, and updates the usage example. 
`closeQuietly()` remains available with its existing behavior for compatibility.
   
   The regression test verifies entry reading within a try-with-resources scope 
and confirms the JAR handle is closed when the scope exits. On the unmodified 
base, the test fails to compile because `JarAnalyzer` is not `AutoCloseable`.
   
   Validation:
   - `mvn -Dtest=JarAnalyzerTest test` — 9 tests passed
   - `mvn verify` — 92 tests passed
   - `mvn spotless:check` — passed
   - `git diff --check` — passed
   
   The repository does not define a `run-its` Maven profile. `mvn -Prun-its 
verify` completed the normal verification lifecycle and reported that the 
requested profile does not exist.
   
   AI assistance disclosure: Codex assisted with investigation, implementation, 
tests, and validation.
   
   - [x] I hereby declare this contribution to be licensed under the [Apache 
License Version 2.0, January 2004](https://www.apache.org/licenses/LICENSE-2.0)
   


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