Fix compilation error in ActorContextDelegateSpec with Scala 2.12 (#31509)
This commit is contained in:
parent
574600c742
commit
2cbc0e63a4
2 changed files with 8 additions and 7 deletions
|
|
@ -213,7 +213,8 @@ public class InteractionPatternsAskWithStatusTest extends JUnitSuite {
|
|||
|
||||
cookies.whenComplete(
|
||||
(cookiesReply, failure) -> {
|
||||
if (cookiesReply != null) System.out.println("Yay, " + cookiesReply.count + " cookies!");
|
||||
if (cookiesReply != null)
|
||||
System.out.println("Yay, " + cookiesReply.count + " cookies!");
|
||||
else System.out.println("Boo! didn't get cookies in time. " + failure);
|
||||
});
|
||||
// #standalone-ask-with-status-fail-future
|
||||
|
|
|
|||
|
|
@ -29,22 +29,22 @@ object ActorContextDelegateSpec {
|
|||
case Ping =>
|
||||
monitor ! ResponseFrom(PingTag, Ping)
|
||||
Behaviors.same
|
||||
case msg @ Pong =>
|
||||
case Pong =>
|
||||
monitor ! ForwardTo(PongTag)
|
||||
context.delegate(pong(monitor), msg)
|
||||
context.delegate(pong(monitor), Pong)
|
||||
}
|
||||
|
||||
def pong(monitor: ActorRef[Event])(implicit context: ActorContext[PingPongCommand]): Behavior[PingPongCommand] =
|
||||
Behaviors.receiveMessage[PingPongCommand] {
|
||||
case msg @ Ping =>
|
||||
case Ping =>
|
||||
monitor ! ForwardTo(PingTag)
|
||||
context.delegate(ping(monitor), msg)
|
||||
context.delegate(ping(monitor), Ping)
|
||||
case Pong =>
|
||||
monitor ! ResponseFrom(PongTag, Pong)
|
||||
Behaviors.same
|
||||
case msg @ UnPingable =>
|
||||
case UnPingable =>
|
||||
monitor ! ForwardTo(PingTag)
|
||||
context.delegate(ping(monitor), msg)
|
||||
context.delegate(ping(monitor), UnPingable)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue