INT-3820: Fix MethodInvokerHelper for the Proxy
JIRA: https://jira.spring.io/browse/INT-3820 Some Proxy may be based on the specif non-user classes and advised with the provided end-user interfaces. The best sample is `@Repository` from Spring Data projects. In this case the `MessagingMethodInvokerHelper` just missed the user interfaces to consider for the candidate methods or thrown an `Exception` like `NoSuchMethodError`. * Add `((Advised) targetObject).getProxiedInterfaces()` for the scanning algorithm * Move the `UniqueMethodFilter` to the internal `Set<Method>` to allow iteration and filtering for methods from the `targetClass` as well as from all those user interfaces * Add Spring JPA repository test-case * Polishing form some time-weak tests Revert MessagingMethodInvokerHelper INT-3820: Simple Proxy Interface Method Matching No-risk solution for INT-3820. Instead of considering all interfaces on the proxy, only look at proxy interfaces for a single matching method name if we find no candidate or fallback methods. Consider the complete solution for 4.3. Add `Message<?>` method distinguishing
This commit is contained in:
committed by
Gary Russell
parent
ca62f18a7b
commit
d8fc94602c
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2010 the original author or authors.
|
||||
* Copyright 2002-2015 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -201,6 +201,7 @@ public class CharacterStreamWritingMessageHandlerTests {
|
||||
public String toString() {
|
||||
return this.text;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -225,7 +226,7 @@ public class CharacterStreamWritingMessageHandlerTests {
|
||||
|
||||
public void await() {
|
||||
try {
|
||||
this.latch.await(1000, TimeUnit.MILLISECONDS);
|
||||
this.latch.await(10000, TimeUnit.MILLISECONDS);
|
||||
if (latch.getCount() != 0) {
|
||||
throw new RuntimeException("test timeout");
|
||||
}
|
||||
@@ -234,6 +235,7 @@ public class CharacterStreamWritingMessageHandlerTests {
|
||||
throw new RuntimeException("test latch.await() interrupted");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user