Alex Kondrashov
1 min readSep 29, 2020

--

Thanks for the feedback! I agree that I've missed the check for missing author ID in the non-Optional version. I will modify my code snippet to have this check.

Regarding your code snippet - it makes total sense and I would prefer if Optionals always have been used like this. In my article I put emphasys against using only get() and isPresent() from Optionals. Instead of using get() and isPresent() a developer could roll back to not to use Optionals at all, or upgrade to the example that you've provided in your response.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Alex Kondrashov
Alex Kondrashov

Written by Alex Kondrashov

Team Lead; Integration Testing; REST API

Responses (1)

Write a response