Current Disabled failed Test
AbstractAspectJAdvisorFactoryTests.testIntroductionWithArgumentBinding
as comment claim the failure is for unknowing reason, here snippet from code source ,
// TODO: Why does this test fail? It hasn't been run before, so it maybe never actually passed...
@Test
@Disabled
public void testIntroductionWithArgumentBinding() {
The problem
After changing the age property of the ITestBean target object, the hash code of the bean change, which causes the creation of a new introduction delegate, that make the proxy unable to retain the state of modified
property .
in other words, the proxy that before advice change its property is no longer associated with the target object.
this new Introduction Delegate is created byDelegatePerTargetObjectIntroductionInterceptor.getIntroductionDelegateFor (Object targetObject)
Possible solution
We could fix the test by changing the AbstractMakeModifiable.recordModificationIfSetterArgumentDiffersFromOldValue
before advice to be an Around advice, in order to execute the target method within the advice, and then changing the proxy state (in this case, it will be the new introduction delegate associated with the updated target bean)
I could provide a pull request if this is the expected behavior.
Comment From: snicoll
To be completely honest, I don't really know what happened but this test isn't failing for more so I've re-enabled it (see https://github.com/spring-projects/spring-framework/commit/ce9ca700f38126983dbdd3b6b67c585033c9b00d). I am going to close this as it is no longer actionable. Thanks for bringing this to our attention and sorry for the delay.