DEV Community

Discussion on: Consistent null values handling in Java

Collapse
chaoyang profile image
Chao Yang

So in this sense, basically we can see only one type: Option, everything, Object field, parameter, return value. The only place we can use the plain type is method body.

It sounds overkilled.

Collapse
siy profile image
Sergiy Yevtushenko Author

Didn't get it. Why we should see Option everywhere? If we sure that value can't be null, then we use plain type. It can be either, method body, parameter or field.