gnodet commented on code in PR #207:
URL: https://github.com/apache/maven-resolver/pull/207#discussion_r1005636121


##########
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:
   Ftr, I disagree with the change.  _already_ has a meaning of doing the same 
_again_.  That's not the case here, as the user does not want to close the 
session, just to use it.



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