Fix typo and code error in documentation (#1779)

* fix typo in documentation "Using builders"

* fix generated code example in stream mapping
This commit is contained in:
power721 2019-04-04 02:21:08 +08:00 committed by Sjaak Derksen
parent 3790f1919a
commit 7e112ccc2f
2 changed files with 3 additions and 3 deletions

View File

@ -41,7 +41,7 @@ public Set<String> integerStreamToStringSet(Stream<Integer> integers) {
return null;
}
return integers.stream().map( integer -> String.valueOf( integer ) )
return integers.map( integer -> String.valueOf( integer ) )
.collect( Collectors.toCollection( HashSet<String>::new ) );
}
@ -51,7 +51,7 @@ public List<CarDto> carsToCarDtos(Stream<Car> cars) {
return null;
}
return integers.stream().map( car -> carToCarDto( car ) )
return cars.map( car -> carToCarDto( car ) )
.collect( Collectors.toCollection( ArrayList<CarDto>::new ) );
}
----

View File

@ -666,7 +666,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: