This is an automated email from the ASF dual-hosted git repository.

slachiewicz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-resolver.git


The following commit(s) were added to refs/heads/master by this push:
     new 704468056 Make the session read-only flag volatile and fix its javadoc
704468056 is described below

commit 704468056deca50bdbc7da2548f4291689066168
Author: Sylwester Lachiewicz <[email protected]>
AuthorDate: Sun Nov 8 23:26:25 2026 +0100

    Make the session read-only flag volatile and fix its javadoc
---
 .../main/java/org/eclipse/aether/DefaultRepositorySystemSession.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/maven-resolver-api/src/main/java/org/eclipse/aether/DefaultRepositorySystemSession.java
 
b/maven-resolver-api/src/main/java/org/eclipse/aether/DefaultRepositorySystemSession.java
index 87d2a2221..6a3652392 100644
--- 
a/maven-resolver-api/src/main/java/org/eclipse/aether/DefaultRepositorySystemSession.java
+++ 
b/maven-resolver-api/src/main/java/org/eclipse/aether/DefaultRepositorySystemSession.java
@@ -69,7 +69,7 @@ import static java.util.Objects.requireNonNull;
  * @see RepositorySystemSession.CloseableSession
  */
 public final class DefaultRepositorySystemSession implements 
RepositorySystemSession {
-    private boolean readOnly;
+    private volatile boolean readOnly;
 
     private boolean offline;
 
@@ -877,7 +877,7 @@ public final class DefaultRepositorySystemSession 
implements RepositorySystemSes
     }
 
     /**
-     * Verifies this instance state for mutation operations: mutated instance 
must not be read-only or closed.
+     * Verifies this instance state for mutation operations: mutated instance 
must not be read-only.
      */
     private void verifyStateForMutation() {
         if (readOnly) {

Reply via email to