The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

Martin L. (1) [Avatar] Offline
#1
In the last example of this section (immediately before section 4.4.4) it would be useful to mention that the method map (line #B) after the method .findAny() is no stream method.
I thought why it's possible to call the stream method map after a terminal operation like findAny. The whole chapter before map was always a Stream method and now it's a method of Optional.

I would suggest to change the comment #B
#B: returns an Optional<String>, the map method is invoked on an Optional not an stream
raoul-gabriel.urma (37) [Avatar] Offline
#2
Re: 4.4.3 Finding an element (Optional in a nutshell)
Thanks for pointing this out! Will add your suggestion now.
Cheers,
R