diff --git a/akka-stream-typed/src/test/java/docs/javadsl/ActorFlowCompileTest.java b/akka-stream-typed/src/test/java/docs/javadsl/ActorFlowCompileTest.java index 1af3201b34..625585abfa 100644 --- a/akka-stream-typed/src/test/java/docs/javadsl/ActorFlowCompileTest.java +++ b/akka-stream-typed/src/test/java/docs/javadsl/ActorFlowCompileTest.java @@ -18,50 +18,50 @@ import java.time.Duration; public class ActorFlowCompileTest { - final ActorSystem system = null; + final ActorSystem system = null; - static - // #ask-actor - class Asking { - final String payload; - final ActorRef replyTo; + static + // #ask-actor + class Asking { + final String payload; + final ActorRef replyTo; - public Asking(String payload, ActorRef replyTo) { - this.payload = payload; - this.replyTo = replyTo; - } + public Asking(String payload, ActorRef replyTo) { + this.payload = payload; + this.replyTo = replyTo; } + } - // #ask-actor - static - // #ask-actor - class Reply { - public final String msg; + // #ask-actor + static + // #ask-actor + class Reply { + public final String msg; - public Reply(String msg) { - this.msg = msg; - } + public Reply(String msg) { + this.msg = msg; } + } - // #ask-actor + // #ask-actor - { + { + // #ask + final ActorRef actorRef = // ??? // #ask - final ActorRef actorRef = // ??? - // #ask - null; + null; - // #ask - Duration timeout = Duration.ofSeconds(1); + // #ask + Duration timeout = Duration.ofSeconds(1); - // method reference notation - Flow askFlow = ActorFlow.ask(actorRef, timeout, Asking::new); + // method reference notation + Flow askFlow = ActorFlow.ask(actorRef, timeout, Asking::new); - // explicit creation of the sent message - Flow askFlowExplicit = - ActorFlow.ask(actorRef, timeout, (msg, replyTo) -> new Asking(msg, replyTo)); + // explicit creation of the sent message + Flow askFlowExplicit = + ActorFlow.ask(actorRef, timeout, (msg, replyTo) -> new Asking(msg, replyTo)); - Source.repeat("hello").via(askFlow).map(reply -> reply.msg).runWith(Sink.seq(), system); - // #ask - } + Source.repeat("hello").via(askFlow).map(reply -> reply.msg).runWith(Sink.seq(), system); + // #ask + } }