private <T> T withDefault(T value, DefaultSupplier<T> defaultValue)
            throws GuacamoleException {
        return value != null ? value : defaultValue.get();
    }
Returns the given value, if non-null. If null, the given default value
is returned.

@param <T>
    The type of value accepted and returned.

@param value
    The possibly null value to return if non-null.

@param defaultValue
    A function which supplies the value to return if the provided value
    is null.
    
@return
    The provided value, if non-null, otherwise the provided default
    value.

@throws GuacamoleException
    If an error occurs while producing/retrieving the default value.
extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/conf/JacksonLDAPConfiguration.java