diff --git a/akka-stream-typed/src/test/java/docs/akka/stream/typed/ActorSinkWithAckExample.java b/akka-stream-typed/src/test/java/docs/akka/stream/typed/ActorSinkWithAckExample.java index 9eeacbf8a4..5888eb07f5 100644 --- a/akka-stream-typed/src/test/java/docs/akka/stream/typed/ActorSinkWithAckExample.java +++ b/akka-stream-typed/src/test/java/docs/akka/stream/typed/ActorSinkWithAckExample.java @@ -17,7 +17,9 @@ public class ActorSinkWithAckExample { // #actor-sink-ref-with-backpressure - class Ack {} + enum Ack { + INSTANCE; + } interface Protocol {} @@ -58,7 +60,6 @@ public class ActorSinkWithAckExample { final ActorRef actorRef = // spawned actor null; // #hidden - final Ack ackMessage = new Ack(); final Complete completeMessage = new Complete(); final Sink sink = @@ -66,7 +67,7 @@ public class ActorSinkWithAckExample { actorRef, (responseActorRef, element) -> new Message(responseActorRef, element), (responseActorRef) -> new Init(responseActorRef), - ackMessage, + Ack.INSTANCE, completeMessage, (exception) -> new Fail(exception));