cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: [CXF-6321] Post-match request filters can only be applied once to the final resource methods
Date Thu, 02 Apr 2015 10:38:22 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes 5b6ebb930 -> 8634da69f


[CXF-6321] Post-match request filters can only be applied once to the final resource methods


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/8634da69
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/8634da69
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/8634da69

Branch: refs/heads/3.0.x-fixes
Commit: 8634da69f2a30a4c379eee6c22baa1c3ae54f8a9
Parents: 5b6ebb9
Author: Sergey Beryozkin <sberyozkin@talend.com>
Authored: Thu Apr 2 11:36:32 2015 +0100
Committer: Sergey Beryozkin <sberyozkin@talend.com>
Committed: Thu Apr 2 11:38:06 2015 +0100

----------------------------------------------------------------------
 .../main/java/org/apache/cxf/jaxrs/JAXRSInvoker.java    | 10 +++++-----
 .../cxf/jaxrs/interceptor/JAXRSInInterceptor.java       | 12 ++++++------
 .../java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java     |  3 +--
 3 files changed, 12 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/8634da69/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 9cba371..086300d 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
@@ -255,11 +255,11 @@ public class JAXRSInvoker extends AbstractInvoker {
                 exchange.put(OperationResourceInfo.class, subOri);
                 inMessage.put(URITemplate.TEMPLATE_PARAMETERS, values);
             
-                if (JAXRSUtils.runContainerRequestFilters(providerFactory,
-                                                      inMessage,
-                                                      false, 
-                                                      subOri.getNameBindings(),
-                                                      true)) {
+                if (!subOri.isSubResourceLocator()
+                    && JAXRSUtils.runContainerRequestFilters(providerFactory,
+                                                             inMessage,
+                                                             false, 
+                                                             subOri.getNameBindings())) {
                     return new MessageContentsList(exchange.get(Response.class));
                 }
                 

http://git-wip-us.apache.org/repos/asf/cxf/blob/8634da69/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSInInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSInInterceptor.java
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSInInterceptor.java
index 921c44c..e32f05c 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSInInterceptor.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSInInterceptor.java
@@ -103,7 +103,7 @@ public class JAXRSInInterceptor extends AbstractPhaseInterceptor<Message>
{
         }
         
         // Global pre-match request filters
-        if (JAXRSUtils.runContainerRequestFilters(providerFactory, message, true, null, false))
{
+        if (JAXRSUtils.runContainerRequestFilters(providerFactory, message, true, null))
{
             return;
         }
         // HTTP method
@@ -198,11 +198,11 @@ public class JAXRSInInterceptor extends AbstractPhaseInterceptor<Message>
{
         }
         
         // Global and name-bound post-match request filters
-        if (JAXRSUtils.runContainerRequestFilters(providerFactory,
-                                                  message,
-                                                  false, 
-                                                  ori.getNameBindings(),
-                                                  false)) {
+        if (!ori.isSubResourceLocator()
+            && JAXRSUtils.runContainerRequestFilters(providerFactory,
+                                                      message,
+                                                      false, 
+                                                      ori.getNameBindings())) {
             return;
         }
         

http://git-wip-us.apache.org/repos/asf/cxf/blob/8634da69/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java
index c3dec62..3aac1a0 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java
@@ -1635,8 +1635,7 @@ public final class JAXRSUtils {
     public static boolean runContainerRequestFilters(ServerProviderFactory pf, 
                                                      Message m, 
                                                      boolean preMatch, 
-                                                     Set<String> names,
-                                                     boolean sub) {
+                                                     Set<String> names) {
         List<ProviderInfo<ContainerRequestFilter>> containerFilters = preMatch

             ? pf.getPreMatchContainerRequestFilters() : pf.getPostMatchContainerRequestFilters(names);
         if (!containerFilters.isEmpty()) {


Mime
View raw message