Perform NullAway build-time checks in more modules
This commit enables null-safety build-time checks in all remaining modules except spring-test. See gh-32475
This commit is contained in:
@@ -101,7 +101,7 @@ class CacheResultInterceptor extends AbstractKeyCacheInterceptor<CacheResultOper
|
||||
private Cache resolveExceptionCache(CacheOperationInvocationContext<CacheResultOperation> context) {
|
||||
CacheResolver exceptionCacheResolver = context.getOperation().getExceptionCacheResolver();
|
||||
if (exceptionCacheResolver != null) {
|
||||
return extractFrom(context.getOperation().getExceptionCacheResolver().resolveCaches(context));
|
||||
return extractFrom(exceptionCacheResolver.resolveCaches(context));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -188,6 +188,7 @@ public class DefaultJCacheOperationSource extends AnnotationJCacheOperationSourc
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("NullAway")
|
||||
protected CacheManager getDefaultCacheManager() {
|
||||
if (getCacheManager() == null) {
|
||||
Assert.state(this.beanFactory != null, "BeanFactory required for default CacheManager resolution");
|
||||
@@ -207,6 +208,7 @@ public class DefaultJCacheOperationSource extends AnnotationJCacheOperationSourc
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("NullAway")
|
||||
protected CacheResolver getDefaultCacheResolver() {
|
||||
if (getCacheResolver() == null) {
|
||||
this.cacheResolver = SingletonSupplier.of(new SimpleCacheResolver(getDefaultCacheManager()));
|
||||
@@ -215,6 +217,7 @@ public class DefaultJCacheOperationSource extends AnnotationJCacheOperationSourc
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("NullAway")
|
||||
protected CacheResolver getDefaultExceptionCacheResolver() {
|
||||
if (getExceptionCacheResolver() == null) {
|
||||
this.exceptionCacheResolver = SingletonSupplier.of(new LazyCacheResolver());
|
||||
|
||||
@@ -90,6 +90,7 @@ public class LocalDataSourceJobStore extends JobStoreCMT {
|
||||
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("NullAway")
|
||||
public void initialize(ClassLoadHelper loadHelper, SchedulerSignaler signaler) throws SchedulerConfigException {
|
||||
// Absolutely needs thread-bound DataSource to initialize.
|
||||
this.dataSource = SchedulerFactoryBean.getConfigTimeDataSource();
|
||||
|
||||
@@ -203,6 +203,7 @@ public abstract class SchedulerAccessor implements ResourceLoaderAware {
|
||||
/**
|
||||
* Register jobs and triggers (within a transaction, if possible).
|
||||
*/
|
||||
@SuppressWarnings("NullAway")
|
||||
protected void registerJobsAndTriggers() throws SchedulerException {
|
||||
TransactionStatus transactionStatus = null;
|
||||
if (this.transactionManager != null) {
|
||||
|
||||
@@ -661,6 +661,7 @@ public class SchedulerFactoryBean extends SchedulerAccessor implements FactoryBe
|
||||
* @see #afterPropertiesSet
|
||||
* @see org.quartz.SchedulerFactory#getScheduler
|
||||
*/
|
||||
@SuppressWarnings("NullAway")
|
||||
protected Scheduler createScheduler(SchedulerFactory schedulerFactory, @Nullable String schedulerName)
|
||||
throws SchedulerException {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user