[
https://issues.apache.org/jira/browse/MRESOLVER-302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17784120#comment-17784120
]
ASF GitHub Bot commented on MRESOLVER-302:
------------------------------------------
cstamas commented on code in PR #357:
URL: https://github.com/apache/maven-resolver/pull/357#discussion_r1386892496
##########
maven-resolver-api/src/main/java/org/eclipse/aether/RepositorySystemSession.java:
##########
@@ -48,6 +51,350 @@
*/
public interface RepositorySystemSession {
+ /**
+ * Immutable session that is closeable, can have onClose handlers
registered and should be handled as a resource.
+ * These session instances can be created with {@link SessionBuilder}.
+ *
+ * @since TBD
+ */
+ interface CloseableRepositorySystemSession extends
RepositorySystemSession, Closeable {
Review Comment:
because that will suddenly emit warning in all the existing code (think
Mojos) that "using closeable reasource without try-with-resource" or alike.
Closing session is really objective of "resolver managing" client code (like
Maven), but "resolver using (but not managing it)" client code (like Maven
Mojos) should really not be annoyed is session closeable or not, they should
NEVER close it anyway,
> Introduce onSession close
> -------------------------
>
> Key: MRESOLVER-302
> URL: https://issues.apache.org/jira/browse/MRESOLVER-302
> Project: Maven Resolver
> Issue Type: Improvement
> Components: Resolver
> Reporter: Tamas Cservenak
> Assignee: Tamas Cservenak
> Priority: Major
> Fix For: 2.0.0
>
>
> The on session close callback, revisited.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)