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.
This commit is contained in:
Alexandre Tamborrino 2016-07-21 17:35:13 +02:00 committed by Johan Andrén
parent 210c11e85e
commit c8dfa2458d
2 changed files with 2 additions and 2 deletions

View file

@ -65,7 +65,7 @@ public class StreamBuffersRateDocTest extends AbstractJavaTest {
final Flow<Integer, Integer, NotUsed> 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<Integer, Integer, NotUsed> flow2 =
flow1.via(
Flow.of(Integer.class)