Java tales: Optional.orElse is dangerous

Photo by Math on Unsplash

Today I learned something the hard way of the Javas Optional.orElse. We had similar implementation in our product:

--

--

--

Father of two, husband and Lead Developer @ OP Financial Group. I write about things I like and things I don’t. More info @ https://drodil.kapsi.fi

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

7 Top Software Development Trends in 2022

Seven Techniques to Master Error Handling

How Spreadsheets remain keystone for data-driven enterprises even after 40 years?

Importance of Spreadsheets: Tip of the Iceberg

Python Under the Hood: Part 1 — Compilation Phase

Control your database with DCL(DATA CONTROL LANGUAGE) Statement

My First Post

“ Fast way to build and publish your first Amazon Alexa Skill within a few minutes with Storyline ”

Now is the time to follow these 3 steps and make the Web Summit work best for you

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Heikki Hellgren

Heikki Hellgren

Father of two, husband and Lead Developer @ OP Financial Group. I write about things I like and things I don’t. More info @ https://drodil.kapsi.fi

More from Medium

Multithreading in Java

Undo Changes With Memento Pattern

Things to know about Java Collection

The Core Java roadmap