Rewview and refactor the EmbeddedServiceConfigurationSupport class.

Make use of Java 17 language features.
Edit Javadoc.
This commit is contained in:
John Blum
2022-03-30 15:23:23 -07:00
parent 87adf3d97b
commit a6f8cc3961

View File

@@ -49,8 +49,7 @@ import org.springframework.util.Assert;
import org.springframework.util.StringUtils;
/**
* The {@link EmbeddedServiceConfigurationSupport} class is an abstract base class supporting
* the configuration of Pivotal GemFire and Apache Geode embedded services.
* An abstract base class supporting the configuration of Apache Geode embedded services.
*
* @author John Blum
* @see java.util.Map
@@ -226,9 +225,7 @@ public abstract class EmbeddedServiceConfigurationSupport extends AbstractAnnota
BeanFactory beanFactory = getBeanFactory();
if (beanFactory instanceof AutowireCapableBeanFactory) {
AutowireCapableBeanFactory autowiringBeanFactory = (AutowireCapableBeanFactory) beanFactory;
if (beanFactory instanceof AutowireCapableBeanFactory autowiringBeanFactory) {
NamedBeanHolder<T> beanHolder = autowiringBeanFactory.resolveNamedBean(beanType);
@@ -352,10 +349,7 @@ public abstract class EmbeddedServiceConfigurationSupport extends AbstractAnnota
@Override
public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {
if (bean instanceof Properties && GEMFIRE_PROPERTIES_BEAN_NAME.equals(beanName)) {
Properties gemfirePropertiesBean = (Properties) bean;
if (bean instanceof Properties gemfirePropertiesBean && GEMFIRE_PROPERTIES_BEAN_NAME.equals(beanName)) {
gemfirePropertiesBean.putAll(this.gemfireProperties);
}