On 7 October 2015 at 23:24, Roger Riggs <roger.ri...@oracle.com> wrote:
> Please consider and comment:
>
>     <T> T nonNullOf(T obj, T defaultObj);
>     <T> T nonNullOf(T, obj, Supplier<T> defaultSupplier);
>
> Details are in the updated webrev:
>      http://cr.openjdk.java.net/~rriggs/webrev-object-non-null/

I think I can live with that name.

The Javadoc for the supplier variant needs to mention that an NPE is
thrown if the supplier itself is null.

@throws NullPointerException if {@code obj} is null and either {@code
supplier} is null or the {@code supplier.get()} value is {@code null}

Stephen

Reply via email to