You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by as...@apache.org on 2016/02/01 23:45:47 UTC
cxf git commit: Allow overriding methodToInvoke selection in
JAXRSInvoker
Repository: cxf
Updated Branches:
refs/heads/master 072aba653 -> abcc137cb
Allow overriding methodToInvoke selection in JAXRSInvoker
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/abcc137c
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/abcc137c
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/abcc137c
Branch: refs/heads/master
Commit: abcc137cb9b27e0da0b4270a18ac2a32df1e9990
Parents: 072aba6
Author: Alessio Soldano <as...@redhat.com>
Authored: Mon Feb 1 23:33:05 2016 +0100
Committer: Alessio Soldano <as...@redhat.com>
Committed: Mon Feb 1 23:33:05 2016 +0100
----------------------------------------------------------------------
.../java/org/apache/cxf/jaxrs/JAXRSInvoker.java | 29 ++++++++++++--------
1 file changed, 17 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cxf/blob/abcc137c/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSInvoker.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSInvoker.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSInvoker.java
index ad2c627..ac445d9 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSInvoker.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSInvoker.java
@@ -166,18 +166,7 @@ public class JAXRSInvoker extends AbstractInvoker {
}
- Method resourceMethod = cri.getMethodDispatcher().getMethod(ori);
-
- Method methodToInvoke = null;
- if (Proxy.class.isInstance(resourceObject)) {
- methodToInvoke = cri.getMethodDispatcher().getProxyMethod(resourceMethod);
- if (methodToInvoke == null) {
- methodToInvoke = InjectionUtils.checkProxy(resourceMethod, resourceObject);
- cri.getMethodDispatcher().addProxyMethod(resourceMethod, methodToInvoke);
- }
- } else {
- methodToInvoke = resourceMethod;
- }
+ Method methodToInvoke = getMethodToInvoke(cri, ori, resourceObject);
List<Object> params = null;
if (request instanceof List) {
@@ -290,6 +279,22 @@ public class JAXRSInvoker extends AbstractInvoker {
setResponseContentTypeIfNeeded(inMessage, result);
return result;
}
+
+ protected Method getMethodToInvoke(ClassResourceInfo cri, OperationResourceInfo ori, Object resourceObject) {
+ Method resourceMethod = cri.getMethodDispatcher().getMethod(ori);
+
+ Method methodToInvoke = null;
+ if (Proxy.class.isInstance(resourceObject)) {
+ methodToInvoke = cri.getMethodDispatcher().getProxyMethod(resourceMethod);
+ if (methodToInvoke == null) {
+ methodToInvoke = InjectionUtils.checkProxy(resourceMethod, resourceObject);
+ cri.getMethodDispatcher().addProxyMethod(resourceMethod, methodToInvoke);
+ }
+ } else {
+ methodToInvoke = resourceMethod;
+ }
+ return methodToInvoke;
+ }
private MessageContentsList checkExchangeForResponse(Exchange exchange) {
Response r = exchange.get(Response.class);