Add nullability annotations to module/spring-boot-data-jpa
See gh-46587
This commit is contained in:
parent
5eedecd110
commit
4ece822805
|
|
@ -20,6 +20,8 @@ import java.util.Map;
|
|||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
import org.jspecify.annotations.Nullable;
|
||||
|
||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.condition.AnyNestedCondition;
|
||||
|
|
@ -91,7 +93,7 @@ public final class JpaRepositoriesAutoConfiguration {
|
|||
};
|
||||
}
|
||||
|
||||
private AsyncTaskExecutor determineBootstrapExecutor(Map<String, AsyncTaskExecutor> taskExecutors) {
|
||||
private @Nullable AsyncTaskExecutor determineBootstrapExecutor(Map<String, AsyncTaskExecutor> taskExecutors) {
|
||||
if (taskExecutors.size() == 1) {
|
||||
return taskExecutors.values().iterator().next();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,6 +19,8 @@ package org.springframework.boot.data.jpa.autoconfigure;
|
|||
import java.lang.annotation.Annotation;
|
||||
import java.util.Locale;
|
||||
|
||||
import org.jspecify.annotations.Nullable;
|
||||
|
||||
import org.springframework.boot.autoconfigure.data.AbstractRepositoryConfigurationSourceSupport;
|
||||
import org.springframework.context.annotation.ImportBeanDefinitionRegistrar;
|
||||
import org.springframework.core.env.Environment;
|
||||
|
|
@ -38,7 +40,7 @@ import org.springframework.util.StringUtils;
|
|||
*/
|
||||
class JpaRepositoriesRegistrar extends AbstractRepositoryConfigurationSourceSupport {
|
||||
|
||||
private BootstrapMode bootstrapMode = null;
|
||||
private @Nullable BootstrapMode bootstrapMode;
|
||||
|
||||
@Override
|
||||
protected Class<? extends Annotation> getAnnotation() {
|
||||
|
|
|
|||
|
|
@ -17,4 +17,7 @@
|
|||
/**
|
||||
* Auto-configuration for Spring Data JPA.
|
||||
*/
|
||||
@NullMarked
|
||||
package org.springframework.boot.data.jpa.autoconfigure;
|
||||
|
||||
import org.jspecify.annotations.NullMarked;
|
||||
|
|
|
|||
Loading…
Reference in New Issue