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

fanningpj pushed a commit to branch 1.3.x
in repository https://gitbox.apache.org/repos/asf/pekko.git


The following commit(s) were added to refs/heads/1.3.x by this push:
     new 112bf79d9b Update OnMessageIntroTest.java (#2492)
112bf79d9b is described below

commit 112bf79d9bb592c50af3bca34b5a75fad3251aec
Author: PJ Fanning <[email protected]>
AuthorDate: Fri Nov 14 09:46:44 2025 +0100

    Update OnMessageIntroTest.java (#2492)
    
    * Update OnMessageIntroTest.java
    
    * Fix JEP 441 link formatting in OnMessageIntroTest.java
---
 .../org/apache/pekko/typed/OnMessageIntroTest.java      | 17 ++++-------------
 1 file changed, 4 insertions(+), 13 deletions(-)

diff --git 
a/actor-typed-tests/src/test/java/jdocs/org/apache/pekko/typed/OnMessageIntroTest.java
 
b/actor-typed-tests/src/test/java/jdocs/org/apache/pekko/typed/OnMessageIntroTest.java
index e24ecef152..1b4e720880 100644
--- 
a/actor-typed-tests/src/test/java/jdocs/org/apache/pekko/typed/OnMessageIntroTest.java
+++ 
b/actor-typed-tests/src/test/java/jdocs/org/apache/pekko/typed/OnMessageIntroTest.java
@@ -128,7 +128,7 @@ public interface OnMessageIntroTest {
       public Behavior<RoomCommand> onMessage(RoomCommand msg) throws 
UnsupportedEncodingException {
         // #chatroom-behavior
         /* From Java 16 onward, various features broadly described as "pattern 
matching"
-         * may prove useful here in lieu of the explicit instanceof checks and 
casts:
+         * prove useful here in lieu of the explicit instanceof checks and 
casts:
          *
          * Java 16 onward: JEP 394 (https://openjdk.java.net/jeps/394) =>
          *   if (msg instanceof GetSession gs) {
@@ -137,26 +137,19 @@ public interface OnMessageIntroTest {
          *     return onPublishSessionMessage(psm);
          *   }
          *
-         * Java 17 onward: JEP 406 (https://openjdk.org/jeps/406) =>
+         * Java 21 onward: JEP 441 (https://openjdk.org/jeps/441) =>
          // #chatroom-behavior
-        // uses Java 17-onward features
+        // uses Java 21-onward features
         switch(msg) {
-          // NB: JEP 409 (https://openjdk.org/jeps/409) may allow not 
including a default clause
           case GetSession gs:
             return onGetSession(gs);
 
           case PublishSessionMessage psm:
             return onPublishSessionMessage(psm);
 
-          default:
-            // for completeness, should never happen
         }
         // #chatroom-behavior
          *
-         * JEPs 420 and 427 make possibly-useful extensions to JEP 406 in 
post-17 Java versions.
-         *
-         * TODO: when we're comfortable with requiring JDK17 for development, 
replace this with
-         * JEP406 example
          */
         if (msg instanceof GetSession) {
           return onGetSession((GetSession) msg);
@@ -218,7 +211,6 @@ public interface OnMessageIntroTest {
       @Override
       public Behavior<SessionCommand> onMessage(SessionCommand msg) {
         // #chatroom-behavior
-        // TODO: JEP406ify
         if (msg instanceof PostMessage) {
           // from client, publish to others via the room
           room.tell(new PublishSessionMessage(screenName, ((PostMessage) 
msg).message));
@@ -232,6 +224,7 @@ public interface OnMessageIntroTest {
         // for completeness
         /*
         // #chatroom-behavior
+        // Java 21 onward: JEP 441 (https://openjdk.org/jeps/441) =>
         switch (msg) {
           case PostMessage pm:
             // from client, publish to others via the room
@@ -243,8 +236,6 @@ public interface OnMessageIntroTest {
             client.tell(nc.message);
             return Behaviors.same();
 
-          default:
-            // for completeness, should never happen
         }
         // #chatroom-behavior
         */


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

Reply via email to