mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
Use @SuppressWarnings("NullAway.Init")`
This commit uses `@SuppressWarnings("NullAway.Init")` when
relevant.
See gh-34147
See gh-34151
This commit is contained in:
+2
-2
@@ -178,7 +178,8 @@ public class ConfigurationClassPostProcessor implements BeanDefinitionRegistryPo
|
||||
|
||||
private ApplicationStartup applicationStartup = ApplicationStartup.DEFAULT;
|
||||
|
||||
private @Nullable List<PropertySourceDescriptor> propertySourceDescriptors;
|
||||
@SuppressWarnings("NullAway.Init")
|
||||
private List<PropertySourceDescriptor> 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);
|
||||
|
||||
+4
-6
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user