Skip to content

Commit

Permalink
Tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephan202 committed Aug 19, 2022
1 parent 2fc399f commit 493db87
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,8 @@ Stream<T> after(Stream<Optional<T>> stream) {
* avoided.
*
* <p><strong>Warning:</strong> this rewrite rule is not completely behavior preserving. The
* original code throws an exception if no value is present, while the replacement will silently
* continue.
* original code throws an exception if the mapping operation does not produce a value, while the
* replacement does not.
*/
// XXX: An alternative approach is to use `.flatMap(Optional::stream)`. That may be a bit longer,
// but yields nicer code. Think about it.
Expand Down

0 comments on commit 493db87

Please sign in to comment.