diff --git a/akka-docs/src/main/paradox/stream/stream-quickstart.md b/akka-docs/src/main/paradox/stream/stream-quickstart.md index f06453d3f2..a95bec5334 100644 --- a/akka-docs/src/main/paradox/stream/stream-quickstart.md +++ b/akka-docs/src/main/paradox/stream/stream-quickstart.md @@ -282,8 +282,8 @@ Scala Java : @@snip [TwitterStreamQuickstartDocTest.java](/akka-docs/src/test/java/jdocs/stream/TwitterStreamQuickstartDocTest.java) { #authors-foreach-println } -Materializing and running a stream always requires a `Materializer` to be @scala[in implicit scope (or passed in explicitly, -like this: `.run(materializer)`)]@java[passed in explicitly, like this: `.run(mat)`]. +Materializing and running a stream always requires an `ActorSystem` to be @scala[in implicit scope (or passed in explicitly, +like this: `.runWith(sink)(system)`)]@java[passed in explicitly, like this: `.runWith(sink, system)`]. The complete snippet looks like this: @@ -414,8 +414,7 @@ has also a type parameter of @scala[`Future[Int]`]@java[`CompletionStage>`]. Next we call `run()` which uses the @scala[implicit] `Materializer` -to materialize and run the Flow. The value returned by calling `run()` on a @scala[`RunnableGraph[T]`]@java[`RunnableGraph`] is of type `T`. +be `run()`, as indicated by its type: @scala[`RunnableGraph[Future[Int]]`]@java[`RunnableGraph>`]. Next we call `run()` which materializes and runs the Flow. The value returned by calling `run()` on a @scala[`RunnableGraph[T]`]@java[`RunnableGraph`] is of type `T`. In our case this type is @scala[`Future[Int]`]@java[`CompletionStage`] which, when completed, will contain the total length of our `tweets` stream. In case of the stream failing, this future would complete with a Failure.