When local variable 'foundAspectJAdvice' is set to true, there is no need to continue checking, it should end with break.

SpringBoot The for loop in AspectJProxyUtils should add break

Comment From: wilkinsona

Thanks for the suggestion, but AspectJProxyUtils is part of Spring Framework rather than Spring Boot. There's a chance that the side-effects of calling isAspectJAdvice for each advisor are important and breaking out of the loop will stop something from working as intended. Can you please open an issue for this here and the Framework team will take a look.

Comment From: brucelwl

see https://github.com/spring-projects/spring-framework/issues/22449