public static <T> T defaultIfNull(T value, T defaultValue) { return defaultIfNull(value, () -> defaultValue); }
public static <T> T defaultIfNull(T value, T defaultValue) { return defaultIfNull(value, () -> defaultValue); }
protected <T> T defaultIfNull(T defaultValue, Supplier<T> valueProvider) { return prefersPool() ? SpringUtils.defaultIfNull(valueProvider.get(), defaultValue) : (defaultValue != null ? defaultValue : valueProvider.get()); }
protected <T> T defaultIfNull(T defaultValue, Supplier<T> valueProvider) { return prefersPool() ? SpringUtils.defaultIfNull(valueProvider.get(), defaultValue) : (defaultValue != null ? defaultValue : valueProvider.get()); }
/** * Gets the current list of dependencies declared in the BeanDefinition for the Bean, returning an * empty String array if the dependsOn property is null. * * @param beanDefinition the BeanDefinition of the Bean containing the dependencies. * @return an array of Bean names that this Bean depends on, or an empty String array if the dependencies * are undefined. * @see #addPdxDiskStoreDependency(org.springframework.beans.factory.config.BeanDefinition) * @see org.springframework.beans.factory.config.BeanDefinition#getDependsOn() */ private String[] getDependsOn(BeanDefinition beanDefinition) { return SpringUtils.defaultIfNull(beanDefinition.getDependsOn(), EMPTY_STRING_ARRAY); } }
/** * Gets the current list of dependencies declared in the BeanDefinition for the Bean, returning an * empty String array if the dependsOn property is null. * * @param beanDefinition the BeanDefinition of the Bean containing the dependencies. * @return an array of Bean names that this Bean depends on, or an empty String array if the dependencies * are undefined. * @see #addPdxDiskStoreDependency(org.springframework.beans.factory.config.BeanDefinition) * @see org.springframework.beans.factory.config.BeanDefinition#getDependsOn() */ private String[] getDependsOn(BeanDefinition beanDefinition) { return SpringUtils.defaultIfNull(beanDefinition.getDependsOn(), EMPTY_STRING_ARRAY); } }