Remove use of Java 17 language features in SDG 2.x line of development.

This commit is contained in:
John Blum
2022-03-30 15:57:25 -07:00
parent a6f8cc3961
commit c0f7469510
2 changed files with 6 additions and 4 deletions

View File

@@ -1004,7 +1004,7 @@ public abstract class AbstractAnnotationConfigSupport
.map(BeanDefinition::getBeanClassName)
.filter(StringUtils::hasText);
boolean beanClassNameNotPresent = beanClassName.isEmpty();
boolean beanClassNameNotPresent = !beanClassName.isPresent();
if (beanClassNameNotPresent) {
beanClassName = optionalBeanDefinition

View File

@@ -225,7 +225,9 @@ public abstract class EmbeddedServiceConfigurationSupport extends AbstractAnnota
BeanFactory beanFactory = getBeanFactory();
if (beanFactory instanceof AutowireCapableBeanFactory autowiringBeanFactory) {
if (beanFactory instanceof AutowireCapableBeanFactory) {
AutowireCapableBeanFactory autowiringBeanFactory = (AutowireCapableBeanFactory) beanFactory;
NamedBeanHolder<T> beanHolder = autowiringBeanFactory.resolveNamedBean(beanType);
@@ -349,8 +351,8 @@ public abstract class EmbeddedServiceConfigurationSupport extends AbstractAnnota
@Override
public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {
if (bean instanceof Properties gemfirePropertiesBean && GEMFIRE_PROPERTIES_BEAN_NAME.equals(beanName)) {
gemfirePropertiesBean.putAll(this.gemfireProperties);
if (bean instanceof Properties && GEMFIRE_PROPERTIES_BEAN_NAME.equals(beanName)) {
((Properties) bean).putAll(this.gemfireProperties);
}
return bean;