spring-geode/src/main/java/org/springframework/geode/core/util/ObjectUtils.java
/**
	 * Safely executes the given {@link ExceptionThrowingOperation} handling any checked {@link Exception}
	 * thrown during the normal execution of the operation by returning the given {@link Object default value}
	 * or throwing an {@link IllegalStateException} if the {@link Object default value} is {@literal null}.
	 *
	 * @param <T> {@link Class type} of {@link Object value} returned from the execution of the operation
	 * as well as the {@link Class type} of the {@link Object default value}.
	 * @param operation {@link ExceptionThrowingOperation} to execute; must not be {@literal null}.
	 * @param defaultValue {@link Object value} to return if the execution of the operation
	 * results in a checked {@link Exception}.
	 * @return the result of the {@link ExceptionThrowingOperation}, returning the {@link Object default value}
	 * if the execution of the operation throws a checked {@link Exception}
	 * @throws IllegalStateException wrapping any checked {@link Exception} thrown by the operation
	 * when the {@link Object default value} is {@literal null}.
	 * @see org.springframework.geode.core.util.ObjectUtils.ExceptionThrowingOperation
	 * @see #doOperationSafely(ExceptionThrowingOperation, Supplier)
	 * @see #returnValueThrowOnNull(Object, RuntimeException)
	 */
Safely executes the given  ExceptionThrowingOperation handling any checked  Exception
thrown during the normal execution of the operation by returning the given  Object default value
or throwing an  IllegalStateException if the  Object default value is  null.

@param   Class type of  Object value returned from the execution of the operation
as well as the  Class type of the  Object default value.
@param operation  ExceptionThrowingOperation to execute; must not be  null.
@param defaultValue  Object value to return if the execution of the operation
results in a checked  Exception.
@return the result of the  ExceptionThrowingOperation, returning the  Object default value
if the execution of the operation throws a checked  Exception
@throws IllegalStateException wrapping any checked  Exception thrown by the operation
when the  Object default value is  null.
Safely executes the given ExceptionThrowingOperation handling any checked Exception thrown during the normal execution of the operation by returning the given Object default value or throwing an IllegalStateException if the Object default value is null . @param Class type of Object value returned from the execution of the operation as well as the Class type of the Object default value . @param operation ExceptionThrowingOperation to execute ; must not be null . @param defaultValue Object value to return if the execution of the operation results in a checked Exception . @return the result of the ExceptionThrowingOperation returning the Object default value if the execution of the operation throws a checked Exception @throws IllegalStateException wrapping any checked Exception thrown by the operation when the Object default value is null .
@Nullable
	public static <T> T doOperationSafely(@NonNull ExceptionThrowingOperation<T> operation, @NonNull T defaultValue) {
		Supplier<T> valueSupplier = () -> defaultValue;
		return doOperationSafely(operation, valueSupplier);
	}
@ Nullable public static < T > T doOperationSafely ( @ NonNull ExceptionThrowingOperation < T > operation , @ NonNull T defaultValue ) { Supplier < T > valueSupplier = ( ) -> defaultValue ; return doOperationSafely ( operation , valueSupplier ) ; }
Safely executes the given {@link ExceptionThrowingOperation} handling any checked {@link Exception}
 thrown during the normal execution of the operation by returning the given {@link Object default value}
 or throwing an {@link IllegalStateException} if the {@link Object default value} is {@literal null}.
Safely executes the given { @link ExceptionThrowingOperation } handling any checked { @link Exception } thrown during the normal execution of the operation by returning the given { @link Object default value } or throwing an { @link IllegalStateException } if the { @link Object default value } is { @literal null } .