-
Notifications
You must be signed in to change notification settings - Fork 188
Open
Description
Since Java 8, Optionals were added to replace null when a method can not return a result, as seen in JsonObject with the methods get, getInt ...
Although the current use of default values is convenient, I think it would be good to allow the use of Optionals, as they allow more control.
I am ready to make the changes myself and submit a pull request, but I'm not sure if it's better, regarding this project's policy, to do it:
- replace the current methods' return type by Optionals (can cause problems with dependancies)
- add new methods (like
getOptional,getIntOptional), which can make the code a bit "messy" (and maybe deprecate the old ones)
Do you think it's worth doing it, and if it is, which would be the best way (I mean, the most user-friendly way) of implementing it?
Metadata
Metadata
Assignees
Labels
No labels