Update core library to use `Optional<T>` where appropriate`
Description
Go through the source code of the core library and add “finder” methods where appropriate, returning Optional<T> instead of nullable values. A majority of such cases can be found by searching for “or <code>null</code> if …” in the Javadocs. Deprecate the nullable-returning methods being replaced.
Go through the source code of the core library and add “finder” methods where appropriate, returning
Optional<T>
instead of nullable values. A majority of such cases can be found by searching for “or <code>null</code> if …” in the Javadocs. Deprecate the nullable-returning methods being replaced.