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.

cemsultan (19) [Avatar] Offline
#1
Hi,

Here are some suggestions to give your book that extra spark:

i. Figure 9.3, map(Insurance::getName) produces Optional<String> in step 6. It may be a good idea to also add Step 7: returns either the String "value" or "Unknown".

ii. Section 9.1, just before the last paragraph, reword: ‘In this way you know for sure whether you’ll get a NullPointerException when dereferencing the name of an insurance company; …’ may be to: ‘In this way you know for sure whether you’ll get a NullPointerException when dereferencing the name of an insurance company should it be null; …’

iii. Unwrapping the value contained in an Optional section, second bullet point, A note about .orElse(T other) method in that the T must be of the same type as in the Optional.

iv. (this point was also raised by another member) Unwrapping the value contained in an Optional section, first bullet point, change from 'unless you’re sure the Optional is empty' to 'unless you’re sure the Optional isn't empty'

v. And finally, in the beginning of chapter 9, a very small suggestion to make it sound that little bit more stimulating: change 'NullPointerExceptions are a pain for any Java developer' to 'NullPointerExceptions are a pain in the neck for any Java developer'

Thanks,
Cem Redif