You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by GitBox <gi...@apache.org> on 2020/03/27 14:43:36 UTC
[GitHub] [cxf] andymc12 commented on a change in pull request #656:
Consolidate getTargetMethod calls
andymc12 commented on a change in pull request #656: Consolidate getTargetMethod calls
URL: https://github.com/apache/cxf/pull/656#discussion_r399315562
##########
File path: core/src/main/java/org/apache/cxf/validation/AbstractValidationInterceptor.java
##########
@@ -108,15 +107,7 @@ protected Method getServiceMethod(Message message) {
Message inMessage = message.getExchange().getInMessage();
Method method = null;
if (inMessage != null) {
- method = (Method)inMessage.get("org.apache.cxf.resource.method");
- if (method == null) {
- BindingOperationInfo bop = inMessage.getExchange().getBindingOperationInfo();
- if (bop != null) {
- MethodDispatcher md = (MethodDispatcher)
- inMessage.getExchange().getService().get(MethodDispatcher.class.getName());
- method = md.getMethod(bop);
- }
- }
+ method = MessageUtils.getTargetMethod(inMessage, null);
Review comment:
Good idea! I'll give the `Optional<Method>` approach a try. Thanks!
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services