Rewview and refactor the EmbeddedServiceConfigurationSupport class.
Make use of Java 17 language features. Edit Javadoc.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user