He-Pin commented on code in PR #1054:
URL: https://github.com/apache/incubator-pekko/pull/1054#discussion_r1468504518
##########
docs/src/main/java-jdk-21/docs/actors/classical/OptimizedActorWithJava21.java:
##########
@@ -1,33 +1,38 @@
-
+package docs.actors.classical;
// #pattern-matching
-static class OptimizedActorWithJava21 extends UntypedAbstractActor {
- public static class Msg1 {}
+import org.apache.pekko.actor.UntypedAbstractActor;
+
+public class OptimizedActorWithJava21 extends UntypedAbstractActor {
+ public static class Msg1 {
+ }
- public static class Msg2 {}
+ public static class Msg2 {
+ }
- public static class Msg3 {}
+ public static class Msg3 {
+ }
- @Override
- public void onReceive(Object msg) throws Exception {
- switch(msg) {
- case Msg1 msg -> receiveMsg1((Msg1) msg);
- case Msg2 msg -> receiveMsg2((Msg2) msg);
- case Msg3 msg -> receiveMsg3((Msg3) msg);
- default _ -> unhandled(msg);
+ @Override
+ public void onReceive(Object msg) throws Exception {
+ switch (msg) {
+ case Msg1 msg1 -> receiveMsg1(msg1);
+ case Msg2 msg2 -> receiveMsg2(msg2);
+ case Msg3 msg3 -> receiveMsg3(msg3);
+ default -> unhandled(msg);
Review Comment:
Now catch.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]