From 65bc935ac94ff9ac6396a5ab7accd8a22cabf5e0 Mon Sep 17 00:00:00 2001 From: Andrei Arlou Date: Tue, 7 May 2024 21:23:58 +0300 Subject: [PATCH] 4.x: Capitalized received message in io.helidon.examples.webserver.websocket.MessageBoardEndpoint (#8725) --- .../examples/webserver/websocket/MessageBoardEndpoint.java | 4 ++-- .../examples/webserver/websocket/MessageBoardTest.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/webserver/websocket/src/main/java/io/helidon/examples/webserver/websocket/MessageBoardEndpoint.java b/examples/webserver/websocket/src/main/java/io/helidon/examples/webserver/websocket/MessageBoardEndpoint.java index 7b458c1f624..7600bee0eaa 100644 --- a/examples/webserver/websocket/src/main/java/io/helidon/examples/webserver/websocket/MessageBoardEndpoint.java +++ b/examples/webserver/websocket/src/main/java/io/helidon/examples/webserver/websocket/MessageBoardEndpoint.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, 2023 Oracle and/or its affiliates. + * Copyright (c) 2020, 2024 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,7 +28,7 @@ public class MessageBoardEndpoint implements WsListener { @Override public void onMessage(WsSession session, String text, boolean last) { // Send all messages in the queue - if (text.equals("send")) { + if (text.equals("SEND")) { while (!messageQueue.isEmpty()) { session.send(messageQueue.pop(), last); } diff --git a/examples/webserver/websocket/src/test/java/io/helidon/examples/webserver/websocket/MessageBoardTest.java b/examples/webserver/websocket/src/test/java/io/helidon/examples/webserver/websocket/MessageBoardTest.java index 9cb3a7f1642..998f0e8be61 100644 --- a/examples/webserver/websocket/src/test/java/io/helidon/examples/webserver/websocket/MessageBoardTest.java +++ b/examples/webserver/websocket/src/test/java/io/helidon/examples/webserver/websocket/MessageBoardTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, 2023 Oracle and/or its affiliates. + * Copyright (c) 2020, 2024 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -83,7 +83,7 @@ public void onMessage(WsSession session, String text, boolean last) { @Override public void onOpen(WsSession session) { - session.send("send", false); + session.send("SEND", false); } });