Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

org.springframework.messaging.handler.invocation.InvocableHandlerMethod should not mention "controller" [SPR-15139] #19705

Closed
spring-issuemaster opened this issue Jan 13, 2017 · 1 comment

Comments

@spring-issuemaster
Copy link
Collaborator

commented Jan 13, 2017

Artem Bilan opened SPR-15139 and commented

I understand that org.springframework.messaging.handler.invocation.InvocableHandlerMethod has been evolved from the org.springframework.web.method.suppor.InvocableHandlerMethod, but it really does nothing about @Controller.

Consider to revise all the top level logging messages do not mention controller word.
Let's say just target (or service) is enough!

Otherwise it is confusing a bit when an exception happens.

In addition it would be great to throw something like MethodArgumentResolutionException in the case:

if (args[i] == null) {
	String msg = getArgumentResolutionErrorMessage("No suitable resolver for argument", i);
	throw new IllegalStateException(msg);
}

Instead of that IllegalStateException.

In Spring Integration we have a use-case when we would like to fallback to SpEL method invocation if InvocableHandlerMethod fails with arguments resolution.

Right, there is no that generic MethodArgumentResolutionException, only AbstractMethodArgumentResolutionException hierarchy, but what does stop us to improve that part?

Thanks


Affects: 4.3.5, 5.0 M4

Issue Links:

  • #19752 InvocableHandlerMethod should call GenericTypeResolver with getBeanType() and only once
@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

commented Jan 16, 2017

Juergen Hoeller commented

I've revised InvocableHandlerMethod's exception messages (controller vs endpoint and consistent handler method terminology) and introduced a dedicated MethodArgumentResolutionException in the invocation package for spring-messaging, deprecating the previous AbstractMethodArgumentResolutionException which was designed as a base class in the handler annotation package only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.