|
|
|
@ -1,5 +1,5 @@ |
|
|
|
/* |
|
|
|
/* |
|
|
|
* Copyright 2002-2021 the original author or authors. |
|
|
|
* Copyright 2002-2022 the original author or authors. |
|
|
|
* |
|
|
|
* |
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
* you may not use this file except in compliance with the License. |
|
|
|
* you may not use this file except in compliance with the License. |
|
|
|
@ -19,7 +19,6 @@ package org.springframework.scheduling.annotation; |
|
|
|
import java.lang.reflect.Method; |
|
|
|
import java.lang.reflect.Method; |
|
|
|
import java.time.Duration; |
|
|
|
import java.time.Duration; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.Arrays; |
|
|
|
|
|
|
|
import java.util.Collection; |
|
|
|
import java.util.Collection; |
|
|
|
import java.util.Collections; |
|
|
|
import java.util.Collections; |
|
|
|
import java.util.IdentityHashMap; |
|
|
|
import java.util.IdentityHashMap; |
|
|
|
@ -361,7 +360,7 @@ public class ScheduledAnnotationBeanPostProcessor |
|
|
|
|
|
|
|
|
|
|
|
Class<?> targetClass = AopProxyUtils.ultimateTargetClass(bean); |
|
|
|
Class<?> targetClass = AopProxyUtils.ultimateTargetClass(bean); |
|
|
|
if (!this.nonAnnotatedClasses.contains(targetClass) && |
|
|
|
if (!this.nonAnnotatedClasses.contains(targetClass) && |
|
|
|
AnnotationUtils.isCandidateClass(targetClass, Arrays.asList(Scheduled.class, Schedules.class))) { |
|
|
|
AnnotationUtils.isCandidateClass(targetClass, List.of(Scheduled.class, Schedules.class))) { |
|
|
|
Map<Method, Set<Scheduled>> annotatedMethods = MethodIntrospector.selectMethods(targetClass, |
|
|
|
Map<Method, Set<Scheduled>> annotatedMethods = MethodIntrospector.selectMethods(targetClass, |
|
|
|
(MethodIntrospector.MetadataLookup<Set<Scheduled>>) method -> { |
|
|
|
(MethodIntrospector.MetadataLookup<Set<Scheduled>>) method -> { |
|
|
|
Set<Scheduled> scheduledAnnotations = AnnotatedElementUtils.getMergedRepeatableAnnotations( |
|
|
|
Set<Scheduled> scheduledAnnotations = AnnotatedElementUtils.getMergedRepeatableAnnotations( |
|
|
|
|