diff --git a/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassPostProcessor.java b/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassPostProcessor.java index a83b7c86218..03a0ef28776 100644 --- a/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassPostProcessor.java +++ b/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassPostProcessor.java @@ -178,7 +178,8 @@ public class ConfigurationClassPostProcessor implements BeanDefinitionRegistryPo private ApplicationStartup applicationStartup = ApplicationStartup.DEFAULT; - private @Nullable List propertySourceDescriptors; + @SuppressWarnings("NullAway.Init") + private List propertySourceDescriptors; @Override @@ -319,7 +320,6 @@ public class ConfigurationClassPostProcessor implements BeanDefinitionRegistryPo } @Override - @SuppressWarnings("NullAway") // Lazy initialization public @Nullable BeanFactoryInitializationAotContribution processAheadOfTime(ConfigurableListableBeanFactory beanFactory) { boolean hasPropertySourceDescriptors = !CollectionUtils.isEmpty(this.propertySourceDescriptors); boolean hasImportRegistry = beanFactory.containsBean(IMPORT_REGISTRY_BEAN_NAME); diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/incrementer/AbstractDataFieldMaxValueIncrementer.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/incrementer/AbstractDataFieldMaxValueIncrementer.java index b9f8093427a..3b37b64cc14 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/incrementer/AbstractDataFieldMaxValueIncrementer.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/incrementer/AbstractDataFieldMaxValueIncrementer.java @@ -18,8 +18,6 @@ package org.springframework.jdbc.support.incrementer; import javax.sql.DataSource; -import org.jspecify.annotations.Nullable; - import org.springframework.beans.factory.InitializingBean; import org.springframework.dao.DataAccessException; import org.springframework.util.Assert; @@ -36,10 +34,12 @@ import org.springframework.util.Assert; */ public abstract class AbstractDataFieldMaxValueIncrementer implements DataFieldMaxValueIncrementer, InitializingBean { - private @Nullable DataSource dataSource; + @SuppressWarnings("NullAway.Init") + private DataSource dataSource; /** The name of the sequence/table containing the sequence. */ - private @Nullable String incrementerName; + @SuppressWarnings("NullAway.Init") + private String incrementerName; /** The length to which a string result should be pre-pended with zeroes. */ protected int paddingLength = 0; @@ -76,7 +76,6 @@ public abstract class AbstractDataFieldMaxValueIncrementer implements DataFieldM /** * Return the data source to retrieve the value from. */ - @SuppressWarnings("NullAway") // Lazy initialization public DataSource getDataSource() { return this.dataSource; } @@ -91,7 +90,6 @@ public abstract class AbstractDataFieldMaxValueIncrementer implements DataFieldM /** * Return the name of the sequence/table. */ - @SuppressWarnings("NullAway") // Lazy initialization public String getIncrementerName() { return this.incrementerName; }