(tomcat) branch main updated: Drop backwards compatibility implementation

[email protected]
Newsgroups gmane.comp.jakarta.tomcat.devel
Message-ID <178733608304.1776938.17108480433765435548@gitbox3-he-fi.apache.org>
This is an automated email from the ASF dual-hosted git repository.

markt-asf pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/main by this push:
     new 84ac9af072 Drop backwards compatibility implementation
84ac9af072 is described below

commit 84ac9af072d4c43ebb44ccc0ceba405ad0a84903
Author: Mark Thomas <[email protected]>
AuthorDate: Fri Aug 21 19:14:36 2026 +0100

    Drop backwards compatibility implementation
---
 java/org/apache/catalina/Store.java | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/java/org/apache/catalina/Store.java b/java/org/apache/catalina/Store.java
index 5e2e2a7b0b..db021b006e 100644
--- a/java/org/apache/catalina/Store.java
+++ b/java/org/apache/catalina/Store.java
@@ -20,7 +20,6 @@ package org.apache.catalina;
 import java.beans.PropertyChangeListener;
 import java.io.IOException;
 import java.util.concurrent.locks.ReadWriteLock;
-import java.util.concurrent.locks.ReentrantReadWriteLock;
 
 
 /**
@@ -150,14 +149,13 @@ public interface Store {
      * Implementations of this interface <b>MUST</b> provide an implementation of this method else any change in session
      * identifier, e.g. on authentication, may result in inconsistent data being held in the store.
      * <p>
-     * Prior to Tomcat 12, the default implementation always returns a new {@link ReadWriteLock} which will not provide
-     * any concurrency protection. From Tomcat 12, an {@link UnsupportedOperationException} is thrown.
+     * The default implementation throws an {@link UnsupportedOperationException}.
      *
      * @param sessionId the session identifier
      *
      * @return The lock for the given session identifier
      */
     default ReadWriteLock getSessionStoreLock(String sessionId) {
-        return new ReentrantReadWriteLock();
+        throw new UnsupportedOperationException();
     }
 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.