Fix incorrect materialized types = Unit in stream documentation (#21938)
* Fix incorrect materialized types = Unit in stream documentation (Fixes #21937) * Correct Int, which should be Integer in Java * Replace BoxedUnit in stream doc
This commit is contained in:
parent
c38d3850a2
commit
3df22baf3a
8 changed files with 15 additions and 15 deletions
|
|
@ -243,19 +243,19 @@ public class CompositionDocTest extends AbstractJavaTest {
|
|||
@Test
|
||||
public void materializedValues() throws Exception {
|
||||
//#mat-combine-1
|
||||
// Materializes to Promise<BoxedUnit> (red)
|
||||
// Materializes to CompletableFuture<Optional<Integer>> (red)
|
||||
final Source<Integer, CompletableFuture<Optional<Integer>>> source = Source.<Integer>maybe();
|
||||
|
||||
// Materializes to BoxedUnit (black)
|
||||
// Materializes to NotUsed (black)
|
||||
final Flow<Integer, Integer, NotUsed> flow1 = Flow.of(Integer.class).take(100);
|
||||
|
||||
// Materializes to Promise<Option<>> (red)
|
||||
// Materializes to CompletableFuture<Optional<Integer>> (red)
|
||||
final Source<Integer, CompletableFuture<Optional<Integer>>> nestedSource =
|
||||
source.viaMat(flow1, Keep.left()).named("nestedSource");
|
||||
//#mat-combine-1
|
||||
|
||||
//#mat-combine-2
|
||||
// Materializes to BoxedUnit (orange)
|
||||
// Materializes to NotUsed (orange)
|
||||
final Flow<Integer, ByteString, NotUsed> flow2 = Flow.of(Integer.class)
|
||||
.map(i -> ByteString.fromString(i.toString()));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue