Declare isStatic and releaseTarget as default methods on TargetSource

Closes gh-31820
This commit is contained in:
Juergen Hoeller
2023-12-12 12:39:52 +01:00
parent eae53560e4
commit 6bb9775309
11 changed files with 14 additions and 98 deletions

View File

@@ -1143,17 +1143,10 @@ public abstract class AbstractAopProxyTests {
return TestBean.class;
}
@Override
public boolean isStatic() {
return false;
}
@Override
public Object getTarget() throws Exception {
assertThat(AopContext.currentProxy()).isEqualTo(proxy);
return target;
}
@Override
public void releaseTarget(Object target) throws Exception {
}
});
// Just test anything: it will fail if context wasn't found
@@ -1903,15 +1896,6 @@ public abstract class AbstractAopProxyTests {
throw new RuntimeException("Expectation failed: " + gets + " gets and " + releases + " releases");
}
}
/**
* @see org.springframework.aop.TargetSource#isStatic()
*/
@Override
public boolean isStatic() {
return false;
}
}