You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2022/10/26 10:47:50 UTC

[GitHub] [maven-resolver] michael-o commented on a diff in pull request #207: [MRESOLVER-278] Session close and onClose hooks fix

michael-o commented on code in PR #207:
URL: https://github.com/apache/maven-resolver/pull/207#discussion_r1005522812


##########
maven-resolver-api/src/main/java/org/eclipse/aether/DefaultRepositorySystemSession.java:
##########
@@ -894,8 +894,11 @@ public Collection<FileTransformer> getTransformersForArtifact( Artifact artifact
     @Override
     public void addOnCloseHandler( Consumer<RepositorySystemSession> handler )
     {
-        verifyStateForMutation();
         requireNonNull( handler, "handler cannot be null" );
+        if ( closed.get() )
+        {
+            throw new IllegalStateException( "repository system session is closed" );

Review Comment:
   is already closed



-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org