We discovered a regression when upgrading from Spring Boot 3.2.1 to Spring Boot 3.2.2.

We have classes with 3 levels of inheritances:

class A {
   String myMethod() { do_stuff; }
} 
class B extends A {
   @Override
   String myMethod()  { 
    super.myMethod();
     do_more_stuff;
   }
} 
@Component
class C extends B {
   // does not override myMethod()
} 

We have a pointcut for the method myMethod

When we inject an object A (an instance of C in our case) and we call the method myMethod, the aspect is not called. If we override in C myMethod by calling super.myMethod, it works. If it is B that is annotated @Component, it works.

The following project reproduces the problem:

demo.zip

When called with Boot 3.2.1, the result is :

===== Aspect called ====

test A: 123
test B: 123

When called with Boot 3.2.2, the result is:

test A: 123
test B: 123

Comment From: jhoeller

This could be related to #32087. Could you please give a 6.1.4 snapshot a try to see whether the issue is still present there?

Comment From: Piloon

Yes I tried and the problem is still present

Comment From: jhoeller

Thanks for the quick check! I suspect that this is a side effect from #21843 in some other form then; we'll revisit this for 6.1.4.

Comment From: jhoeller

This turned out to be a generics matching problem: As your attached demo illustrates, the step-by-step narrowing of the generic type at multiple hierarchy levels - without a concrete declaration at the lowest level - broke the bridge method resolution.

We selectively use the concrete target class for candidate retrieval now (which is necessary for the Eclipse compiler compatibility that the 6.1.3 change brought) whereas for method matching we use the declaration level (as before 6.1.3). This hopefully addresses all scenarios now.

@Piloon please give the upcoming 6.1.4 snapshot (https://ci.spring.io/teams/spring-framework/pipelines/spring-framework-6.1.x/jobs/build/builds/1382) another try, I hope this fixes your actual scenario as well.

Comment From: Piloon

@jhoeller , the new 6.1.4 snapshot fixes the issue. Thanks a lot for the quick fix !

Comment From: jhoeller

Good to hear, thanks for double-checking!