Merge branch '6.1.x'
This commit is contained in:
@@ -121,6 +121,7 @@ public class JCacheCacheManager extends AbstractTransactionSupportingCacheManage
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
protected Cache getMissingCache(String name) {
|
||||
CacheManager cacheManager = getCacheManager();
|
||||
Assert.state(cacheManager != null, "No CacheManager set");
|
||||
|
||||
@@ -58,6 +58,7 @@ public abstract class AnnotationJCacheOperationSource extends AbstractFallbackJC
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
protected JCacheOperation<?> findCacheOperation(Method method, @Nullable Class<?> targetType) {
|
||||
CacheResult cacheResult = method.getAnnotation(CacheResult.class);
|
||||
CachePut cachePut = method.getAnnotation(CachePut.class);
|
||||
|
||||
@@ -23,6 +23,7 @@ import org.springframework.cache.Cache;
|
||||
import org.springframework.cache.interceptor.CacheErrorHandler;
|
||||
import org.springframework.cache.interceptor.CacheOperationInvocationContext;
|
||||
import org.springframework.cache.interceptor.CacheOperationInvoker;
|
||||
import org.springframework.lang.Nullable;
|
||||
|
||||
/**
|
||||
* Intercept methods annotated with {@link CachePut}.
|
||||
@@ -39,6 +40,7 @@ class CachePutInterceptor extends AbstractKeyCacheInterceptor<CachePutOperation,
|
||||
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
protected Object invoke(
|
||||
CacheOperationInvocationContext<CachePutOperation> context, CacheOperationInvoker invoker) {
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ import org.springframework.cache.Cache;
|
||||
import org.springframework.cache.interceptor.CacheErrorHandler;
|
||||
import org.springframework.cache.interceptor.CacheOperationInvocationContext;
|
||||
import org.springframework.cache.interceptor.CacheOperationInvoker;
|
||||
import org.springframework.lang.Nullable;
|
||||
|
||||
/**
|
||||
* Intercept methods annotated with {@link CacheRemoveAll}.
|
||||
@@ -38,6 +39,7 @@ class CacheRemoveAllInterceptor extends AbstractCacheInterceptor<CacheRemoveAllO
|
||||
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
protected Object invoke(
|
||||
CacheOperationInvocationContext<CacheRemoveAllOperation> context, CacheOperationInvoker invoker) {
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ import org.springframework.cache.Cache;
|
||||
import org.springframework.cache.interceptor.CacheErrorHandler;
|
||||
import org.springframework.cache.interceptor.CacheOperationInvocationContext;
|
||||
import org.springframework.cache.interceptor.CacheOperationInvoker;
|
||||
import org.springframework.lang.Nullable;
|
||||
|
||||
/**
|
||||
* Intercept methods annotated with {@link CacheRemove}.
|
||||
@@ -38,6 +39,7 @@ class CacheRemoveEntryInterceptor extends AbstractKeyCacheInterceptor<CacheRemov
|
||||
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
protected Object invoke(
|
||||
CacheOperationInvocationContext<CacheRemoveOperation> context, CacheOperationInvoker invoker) {
|
||||
|
||||
|
||||
@@ -180,6 +180,7 @@ public class JCacheAspectSupport extends AbstractCacheInvoker implements Initial
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public Object invoke() throws ThrowableWrapper {
|
||||
return invokeOperation(this.delegate);
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ import org.springframework.cache.interceptor.AbstractCacheResolver;
|
||||
import org.springframework.cache.interceptor.BasicOperation;
|
||||
import org.springframework.cache.interceptor.CacheOperationInvocationContext;
|
||||
import org.springframework.cache.interceptor.CacheResolver;
|
||||
import org.springframework.lang.Nullable;
|
||||
|
||||
/**
|
||||
* A simple {@link CacheResolver} that resolves the exception cache
|
||||
@@ -41,6 +42,7 @@ public class SimpleExceptionCacheResolver extends AbstractCacheResolver {
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
protected Collection<String> getCacheNames(CacheOperationInvocationContext<?> context) {
|
||||
BasicOperation operation = context.getOperation();
|
||||
if (!(operation instanceof CacheResultOperation cacheResultOperation)) {
|
||||
|
||||
@@ -83,6 +83,7 @@ public class TransactionAwareCacheDecorator implements Cache {
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public <T> T get(Object key, @Nullable Class<T> type) {
|
||||
return this.targetCache.get(key, type);
|
||||
}
|
||||
|
||||
@@ -199,6 +199,7 @@ public class MethodInvokingJobDetailFactoryBean extends ArgumentConvertingMethod
|
||||
* Overridden to support the {@link #setTargetBeanName "targetBeanName"} feature.
|
||||
*/
|
||||
@Override
|
||||
@Nullable
|
||||
public Class<?> getTargetClass() {
|
||||
Class<?> targetClass = super.getTargetClass();
|
||||
if (targetClass == null && this.targetBeanName != null) {
|
||||
@@ -212,6 +213,7 @@ public class MethodInvokingJobDetailFactoryBean extends ArgumentConvertingMethod
|
||||
* Overridden to support the {@link #setTargetBeanName "targetBeanName"} feature.
|
||||
*/
|
||||
@Override
|
||||
@Nullable
|
||||
public Object getTargetObject() {
|
||||
Object targetObject = super.getTargetObject();
|
||||
if (targetObject == null && this.targetBeanName != null) {
|
||||
|
||||
@@ -22,6 +22,7 @@ import org.springframework.aot.hint.RuntimeHintsRegistrar;
|
||||
import org.springframework.aot.hint.TypeHint.Builder;
|
||||
import org.springframework.aot.hint.TypeReference;
|
||||
import org.springframework.aot.hint.annotation.ReflectiveRuntimeHintsRegistrar;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.util.ClassUtils;
|
||||
|
||||
/**
|
||||
@@ -40,7 +41,7 @@ class SchedulerFactoryBeanRuntimeHints implements RuntimeHintsRegistrar {
|
||||
|
||||
|
||||
@Override
|
||||
public void registerHints(RuntimeHints hints, ClassLoader classLoader) {
|
||||
public void registerHints(RuntimeHints hints, @Nullable ClassLoader classLoader) {
|
||||
if (!ClassUtils.isPresent(SCHEDULER_FACTORY_CLASS_NAME, classLoader)) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user