From bd1f6e6f27007010fc2fdafbca4a217b763a2a9c Mon Sep 17 00:00:00 2001 From: power721 Date: Thu, 4 Apr 2019 02:21:08 +0800 Subject: [PATCH] Fix typo and code error in documentation (#1779) * fix typo in documentation "Using builders" * fix generated code example in stream mapping --- documentation/src/main/asciidoc/mapping-streams.asciidoc | 4 ++-- .../src/main/asciidoc/mapstruct-reference-guide.asciidoc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/documentation/src/main/asciidoc/mapping-streams.asciidoc b/documentation/src/main/asciidoc/mapping-streams.asciidoc index a52a569c0..ccc3e5685 100644 --- a/documentation/src/main/asciidoc/mapping-streams.asciidoc +++ b/documentation/src/main/asciidoc/mapping-streams.asciidoc @@ -41,7 +41,7 @@ public Set integerStreamToStringSet(Stream integers) { return null; } - return integers.stream().map( integer -> String.valueOf( integer ) ) + return integers.map( integer -> String.valueOf( integer ) ) .collect( Collectors.toCollection( HashSet::new ) ); } @@ -51,7 +51,7 @@ public List carsToCarDtos(Stream cars) { return null; } - return integers.stream().map( car -> carToCarDto( car ) ) + return cars.map( car -> carToCarDto( car ) ) .collect( Collectors.toCollection( ArrayList::new ) ); } ---- diff --git a/documentation/src/main/asciidoc/mapstruct-reference-guide.asciidoc b/documentation/src/main/asciidoc/mapstruct-reference-guide.asciidoc index 981d78432..e283ae8e8 100644 --- a/documentation/src/main/asciidoc/mapstruct-reference-guide.asciidoc +++ b/documentation/src/main/asciidoc/mapstruct-reference-guide.asciidoc @@ -656,7 +656,7 @@ project on GitHub. MapStruct also supports mapping of immutable types via builders. When performing a mapping MapStruct checks if there is a builder for the type being mapped. This is done via the `BuilderProvider` SPI. -If a Builder exists for a certain type, than that builder will be used for the mappings. +If a Builder exists for a certain type, then that builder will be used for the mappings. The default implementation of the `BuilderProvider` assumes the following: