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 a {@link Object default value}
	 * supplied by the given {@link Supplier}, or throws an {@link IllegalStateException}
	 * if the {@link Supplier supplied 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 valueSupplier {@link Supplier} of the {@link Object value} to return if the execution of the operation
	 * results in a checked {@link Exception}; must not be {@literal null}.
	 * @return the result of the {@link ExceptionThrowingOperation}, returning the {@link Supplier supplied 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 Supplier supplied value} is {@literal null}.
	 * @see org.springframework.geode.core.util.ObjectUtils.ExceptionThrowingOperation
	 * @see #doOperationSafely(ExceptionThrowingOperation, Function)
	 * @see #returnValueThrowOnNull(Object, RuntimeException)
	 * @see java.util.function.Supplier
	 */
Safely executes the given  ExceptionThrowingOperation handling any checked  Exception
thrown during the normal execution of the operation by returning a  Object default value
supplied by the given  Supplier, or throws an  IllegalStateException
if the  Supplier supplied 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 valueSupplier  Supplier of the  Object value to return if the execution of the operation
results in a checked  Exception; must not be  null.
@return the result of the  ExceptionThrowingOperation, returning the  Supplier supplied value
if the execution of the operation throws a checked  Exception
@throws IllegalStateException wrapping any checked  Exception thrown by the operation
when the  Supplier supplied value is  null.
Safely executes the given ExceptionThrowingOperation handling any checked Exception thrown during the normal execution of the operation by returning a Object default value supplied by the given Supplier or throws an IllegalStateException if the Supplier supplied 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 valueSupplier Supplier of the Object value to return if the execution of the operation results in a checked Exception ; must not be null . @return the result of the ExceptionThrowingOperation returning the Supplier supplied value if the execution of the operation throws a checked Exception @throws IllegalStateException wrapping any checked Exception thrown by the operation when the Supplier supplied value is null .
public static <T> T doOperationSafely(@NonNull ExceptionThrowingOperation<T> operation,
			@NonNull Supplier<T> valueSupplier) {
		Function<Throwable, T> exceptionHandlingFunction = cause ->
			returnValueThrowOnNull(valueSupplier.get(), newIllegalStateException(cause, "Failed to execute operation"));
		return doOperationSafely(operation, exceptionHandlingFunction);
	}
public static < T > T doOperationSafely ( @ NonNull ExceptionThrowingOperation < T > operation , @ NonNull Supplier < T > valueSupplier ) { Function < Throwable , T > exceptionHandlingFunction = cause -> returnValueThrowOnNull ( valueSupplier . get ( ) , newIllegalStateException ( cause , "Failed to execute operation" ) ) ; return doOperationSafely ( operation , exceptionHandlingFunction ) ; }
Safely executes the given {@link ExceptionThrowingOperation} handling any checked {@link Exception}
 thrown during the normal execution of the operation by returning a {@link Object default value}
 supplied by the given {@link Supplier}, or throws an {@link IllegalStateException}
 if the {@link Supplier supplied 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 a { @link Object default value } supplied by the given { @link Supplier } or throws an { @link IllegalStateException } if the { @link Supplier supplied value } is { @literal null } .