From 6fab602cdfce66749ab883c133d5aaedac43d1b0 Mon Sep 17 00:00:00 2001 From: John Blum Date: Wed, 27 Oct 2021 15:27:33 -0700 Subject: [PATCH] Refactor the STDG SpringUtils class to extend the SDG SpringUtils class. Add and edit Javadoc. --- .../data/gemfire/tests/util/SpringUtils.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/spring-data-geode-test/src/main/java/org/springframework/data/gemfire/tests/util/SpringUtils.java b/spring-data-geode-test/src/main/java/org/springframework/data/gemfire/tests/util/SpringUtils.java index d90d37f..fe3a26e 100644 --- a/spring-data-geode-test/src/main/java/org/springframework/data/gemfire/tests/util/SpringUtils.java +++ b/spring-data-geode-test/src/main/java/org/springframework/data/gemfire/tests/util/SpringUtils.java @@ -29,10 +29,11 @@ import org.springframework.lang.Nullable; * @see java.util.function.Function * @see org.springframework.context.ApplicationContext * @see org.springframework.context.ConfigurableApplicationContext + * @see org.springframework.data.gemfire.util.SpringUtils * @since 1.0.0 */ @SuppressWarnings("unused") -public abstract class SpringUtils { +public abstract class SpringUtils extends org.springframework.data.gemfire.util.SpringUtils { public static final Function APPLICATION_CONTEXT_CLOSING_FUNCTION = applicationContext -> { @@ -45,6 +46,13 @@ public abstract class SpringUtils { return false; }; + /** + * Closes the given optionally provided {@link ApplicationContext}. + * + * @param applicationContext {@link ApplicationContext} to close. + * @return a boolean value indicating whether the {@link ApplicationContext} could be closed successfully or not. + * @see org.springframework.context.ApplicationContext + */ public static boolean closeApplicationContext(@Nullable ApplicationContext applicationContext) { return Optional.ofNullable(applicationContext)