From c8dfa2458d0220fd6d837a0e943f800d436f565c Mon Sep 17 00:00:00 2001 From: Alexandre Tamborrino Date: Thu, 21 Jul 2016 17:35:13 +0200 Subject: [PATCH] Fix snippet example in stream-rate doc #21006 Fix #section-buffer by replacing .withAttributes by .addAttributes to avoid overwriting the .async option. * Update StreamBuffersRateDocTest.java Fix #section-buffer by replacing .withAttributes by .addAttributes to avoid overwriting the .async option. --- .../rst/java/code/docs/stream/StreamBuffersRateDocTest.java | 2 +- .../rst/scala/code/docs/stream/StreamBuffersRateSpec.scala | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/akka-docs/rst/java/code/docs/stream/StreamBuffersRateDocTest.java b/akka-docs/rst/java/code/docs/stream/StreamBuffersRateDocTest.java index a1383e6626..0adc78c863 100644 --- a/akka-docs/rst/java/code/docs/stream/StreamBuffersRateDocTest.java +++ b/akka-docs/rst/java/code/docs/stream/StreamBuffersRateDocTest.java @@ -65,7 +65,7 @@ public class StreamBuffersRateDocTest extends AbstractJavaTest { final Flow flow1 = Flow.of(Integer.class) .map(elem -> elem * 2).async() - .withAttributes(Attributes.inputBuffer(1, 1)); // the buffer size of this map is 1 + .addAttributes(Attributes.inputBuffer(1, 1)); // the buffer size of this map is 1 final Flow flow2 = flow1.via( Flow.of(Integer.class) diff --git a/akka-docs/rst/scala/code/docs/stream/StreamBuffersRateSpec.scala b/akka-docs/rst/scala/code/docs/stream/StreamBuffersRateSpec.scala index dc29301e75..eee8237169 100644 --- a/akka-docs/rst/scala/code/docs/stream/StreamBuffersRateSpec.scala +++ b/akka-docs/rst/scala/code/docs/stream/StreamBuffersRateSpec.scala @@ -30,7 +30,7 @@ class StreamBuffersRateSpec extends AkkaSpec { //#section-buffer val section = Flow[Int].map(_ * 2).async - .withAttributes(Attributes.inputBuffer(initial = 1, max = 1)) // the buffer size of this map is 1 + .addAttributes(Attributes.inputBuffer(initial = 1, max = 1)) // the buffer size of this map is 1 val flow = section.via(Flow[Int].map(_ / 2)).async // the buffer size of this map is the default //#section-buffer }