SWS-787 - MethodEndpoint.getBean is inconsistent with its API

This commit is contained in:
Arjen Poutsma
2012-08-07 09:56:59 +00:00
parent 7a9eba760d
commit ed4310803a

View File

@@ -128,11 +128,7 @@ public final class MethodEndpoint {
* @throws Exception when the method invocation results in an exception
*/
public Object invoke(Object... args) throws Exception {
Object endpoint = bean;
if (endpoint instanceof String) {
String endpointName = (String) endpoint;
endpoint = beanFactory.getBean(endpointName);
}
Object endpoint = getBean();
ReflectionUtils.makeAccessible(method);
try {
return method.invoke(endpoint, args);