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

rmaucher pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 1e9b33cfb0500dd6860cdc25e975b674cfdbfecb
Author: opencode <[email protected]>
AuthorDate: Sat Oct 17 11:18:12 2026 +0200

    Fix resource bundle key used by WsFrameClient
    
    The defensive IllegalStateException thrown by the default branch of
    processSocketRead() used the message key
    "wsFrameServer.illegalReadState". That key is only defined in the
    org.apache.tomcat.websocket.server resource bundle. WsFrameClient's
    StringManager loads the bundle of its own package
    (org.apache.tomcat.websocket), so the lookup failed and the exception
    message degraded to the raw key instead of the intended
    "Unexpected read state [X]", making diagnosis of the (rare) read state
    race confusing.
    
    Use the key "wsFrame.illegalReadState", which is defined in the
    websocket bundle and is already used correctly elsewhere in the same
    class. This is a copy-paste leftover from WsFrameServer, which
    legitimately uses the server bundle key.
---
 java/org/apache/tomcat/websocket/WsFrameClient.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/tomcat/websocket/WsFrameClient.java 
b/java/org/apache/tomcat/websocket/WsFrameClient.java
index 9b051db4dd..46098acdd5 100644
--- a/java/org/apache/tomcat/websocket/WsFrameClient.java
+++ b/java/org/apache/tomcat/websocket/WsFrameClient.java
@@ -120,7 +120,7 @@ public class WsFrameClient extends WsFrameBase {
                     }
                     return;
                 default:
-                    throw new 
IllegalStateException(sm.getString("wsFrameServer.illegalReadState", 
getReadState()));
+                    throw new 
IllegalStateException(sm.getString("wsFrame.illegalReadState", getReadState()));
             }
         }
     }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to