elharo opened a new issue, #1992: URL: https://github.com/apache/maven-resolver/issues/1992
**Affected version:** HEAD **Files:** - `maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/DefaultArtifactResolver.java:189-190, 393-397, 430-432` - `maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/DefaultMetadataResolver.java:142-143, 302-373` Two `SyncContext` instances (`shared` and `exclusive`) are created in try-with-resources. Inside `resolve()`, `current` starts as `shared`, and when switching to `exclusive` (line 393-396), `current.close()` is called, then `current = exclusive`. The outer try-with-resources also closes both on exit (line 202 for try-with-resources, and line 431 for the inner `current.close()`). While `SyncContext.close()` is documented as idempotent, any implementation that violates this contract would cause issues. Originally reported in #1944. -- 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]
