Thanks for reporting. Could you please open a pull request with the fix? Regards, Patrik
On Sat, Jul 2, 2016 at 12:31 AM, Sergey Sopin <sopin1...@gmail.com> wrote: > Hi, > > It seems that one of examples in the documentation contains bug, namely: > http://doc.akka.io/docs/akka/2.4.7/java/stream/stream-graphs.html > > > 1. final Source<Integer, NotUsed> in = Source.from(Arrays.asList(1, 2, > 3, 4, 5)); > 2. final Sink<List<String>, CompletionStage<List<String>>> sink = Sink. > head(); > 3. final Sink<List<Integer>, CompletionStage<List<Integer>>> sink2 = > Sink.head(); > 4. final Flow<Integer, Integer, NotUsed> f1 = Flow.of(Integer.class). > map(elem -> elem + 10); > 5. final Flow<Integer, Integer, NotUsed> f2 = Flow.of(Integer.class). > map(elem -> elem + 20); > 6. final Flow<Integer, String, NotUsed> f3 = Flow.of(Integer.class).map > (elem -> elem.toString()); > 7. final Flow<Integer, Integer, NotUsed> f4 = Flow.of(Integer.class). > map(elem -> elem + 30); > 8. > 9. final RunnableGraph<CompletionStage<List<String>>> result = > 10. RunnableGraph.<CompletionStage<List<String>>>fromGraph( > 11. GraphDSL > 12. .create( > 13. sink, > 14. (builder, out) -> { > 15. final UniformFanOutShape<Integer, Integer> bcast = builder > .add(Broadcast.create(2)); > 16. final UniformFanInShape<Integer, Integer> merge = builder. > add(Merge.create(2)); > 17. > 18. final Outlet<Integer> source = builder.add(in).out(); > 19. builder.from(source).via(builder.add(f1)) > 20. .viaFanOut(bcast).via(builder.add(f2)).viaFanIn(merge) > 21. .via(builder.add(f3.grouped(1000))).to(out); > 22. builder.from(bcast).via(builder.add(f4)).toFanIn(merge); > 23. return ClosedShape.getInstance(); > 24. })); > > > Here we define 'sink2' variable, but never use it. We are using 'out' > variable instead, which is undefined. > Please fix this confusing thing when it will be possible. > > Thanks, > Sergey > > -- > >>>>>>>>>> Read the docs: http://akka.io/docs/ > >>>>>>>>>> Check the FAQ: > http://doc.akka.io/docs/akka/current/additional/faq.html > >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user > --- > You received this message because you are subscribed to the Google Groups > "Akka User List" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to akka-user+unsubscr...@googlegroups.com. > To post to this group, send email to akka-user@googlegroups.com. > Visit this group at https://groups.google.com/group/akka-user. > For more options, visit https://groups.google.com/d/optout. > -- Patrik Nordwall Akka Tech Lead Lightbend <http://www.lightbend.com/> - Reactive apps on the JVM Twitter: @patriknw -- >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>>>>>>>> Check the FAQ: >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups "Akka User List" group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.