-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Open
Description
It's a little bit more than adding a built-in conversion:
- For
Optional<T> propsource property:- add check for
prop.isPresent()in addition to the null-check (in every spot where we currently use our null-check assignment wrapper) - using
prop.get()to fetch the value
- add check for
- For
Optional<T> proptarget property:- use
Optional.empty()instead ofnullfor null-assignments, orOptional.ofNullable(..)for other assignments.
- use
Optionally (pun intended) also support the equivalent in Guavas com.google.common.base.Optional, which uses different names for the factory methods.
LinkedList, obozek, natros, gaetancollaud, gervaisb and 92 moreDavel-11, igor-dmitriev, VadimKirilchuk, Prigovor and goddtriffinDavel-11, igor-dmitriev, VadimKirilchuk, Prigovor and goddtriffinDavel-11, igor-dmitriev, KasunDon, KeplerKid, ScarWar and 10 more