mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-17 08:24:13 +00:00
Refine SingletonSupplier<T> static methods nullability
SingletonSupplier<T> supplier-based static methods nullability should be refined to accept in a flexible way nullable or non-nullable T. Closes gh-35559
This commit is contained in:
+3
-2
@@ -41,11 +41,12 @@ import org.springframework.context.annotation.Role;
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
public abstract class AbstractJCacheConfiguration extends AbstractCachingConfiguration {
|
||||
|
||||
protected @Nullable Supplier<@Nullable CacheResolver> exceptionCacheResolver;
|
||||
@SuppressWarnings("NullAway.Init")
|
||||
protected Supplier<@Nullable CacheResolver> exceptionCacheResolver;
|
||||
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("NullAway") // https://github.com/uber/NullAway/issues/1128
|
||||
@SuppressWarnings("NullAway") // See https://github.com/uber/NullAway/issues/1290
|
||||
protected void useCachingConfigurer(CachingConfigurerSupplier cachingConfigurerSupplier) {
|
||||
super.useCachingConfigurer(cachingConfigurerSupplier);
|
||||
this.exceptionCacheResolver = cachingConfigurerSupplier.adapt(config -> {
|
||||
|
||||
+3
-3
@@ -50,11 +50,11 @@ import org.springframework.util.function.SupplierUtils;
|
||||
public class DefaultJCacheOperationSource extends AnnotationJCacheOperationSource
|
||||
implements BeanFactoryAware, SmartInitializingSingleton {
|
||||
|
||||
private @Nullable SingletonSupplier<CacheManager> cacheManager;
|
||||
private @Nullable SingletonSupplier<@Nullable CacheManager> cacheManager;
|
||||
|
||||
private @Nullable SingletonSupplier<CacheResolver> cacheResolver;
|
||||
private @Nullable SingletonSupplier<@Nullable CacheResolver> cacheResolver;
|
||||
|
||||
private @Nullable SingletonSupplier<CacheResolver> exceptionCacheResolver;
|
||||
private @Nullable SingletonSupplier<@Nullable CacheResolver> exceptionCacheResolver;
|
||||
|
||||
private SingletonSupplier<KeyGenerator> keyGenerator;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user