cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1500816 - in /cxf/branches/2.7.x-fixes: ./ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/
Date Mon, 08 Jul 2013 16:14:24 GMT
Author: sergeyb
Date: Mon Jul  8 16:14:24 2013
New Revision: 1500816

URL: http://svn.apache.org/r1500816
Log:
Merged revisions 1500738 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1500738 | sergeyb | 2013-07-08 15:01:49 +0100 (Mon, 08 Jul 2013) | 1 line
  
  [CXF-5104] Inject contexts when CXF continuations are used, patch from Sharath P. applied
........

Added:
    cxf/branches/2.7.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookCxfContinuationServer.java
      - copied unchanged from r1500738, cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookCxfContinuationServer.java
    cxf/branches/2.7.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookCxfContinuationStore.java
      - copied unchanged from r1500738, cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookCxfContinuationStore.java
    cxf/branches/2.7.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSCxfContinuationsTest.java
      - copied, changed from r1500738, cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSCxfContinuationsTest.java
Modified:
    cxf/branches/2.7.x-fixes/   (props changed)
    cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSInvoker.java

Propchange: cxf/branches/2.7.x-fixes/
------------------------------------------------------------------------------
  Merged /cxf/trunk:r1500738

Propchange: cxf/branches/2.7.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSInvoker.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSInvoker.java?rev=1500816&r1=1500815&r2=1500816&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSInvoker.java
(original)
+++ cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSInvoker.java
Mon Jul  8 16:14:24 2013
@@ -148,32 +148,30 @@ public class JAXRSInvoker extends Abstra
         boolean wasSuspended = exchange.remove(REQUEST_WAS_SUSPENDED) != null;
         
         if (!wasSuspended) {
-            
             pushOntoStack(ori, ClassHelper.getRealClass(resourceObject), inMessage);
+        }
             
-            final boolean contextsAvailable = cri.contextsAvailable();
-            final boolean paramsAvailable = cri.paramsAvailable();
-            if (contextsAvailable || paramsAvailable) {
-                Object realResourceObject = ClassHelper.getRealObject(resourceObject);
-                if (paramsAvailable) {
-                    JAXRSUtils.injectParameters(ori, realResourceObject, inMessage);
-                }
-                if (contextsAvailable) {
-                    InjectionUtils.injectContexts(realResourceObject, cri, inMessage);
-                }
+        final boolean contextsAvailable = cri.contextsAvailable();
+        final boolean paramsAvailable = cri.paramsAvailable();
+        if (contextsAvailable || paramsAvailable) {
+            Object realResourceObject = ClassHelper.getRealObject(resourceObject);
+            if (paramsAvailable) {
+                JAXRSUtils.injectParameters(ori, realResourceObject, inMessage);
             }
-            if (cri.isRoot()) {
-                ProviderInfo<?> appProvider = 
-                    (ProviderInfo<?>)exchange.getEndpoint().get(Application.class.getName());
-                if (appProvider != null) {
-                    InjectionUtils.injectContexts(appProvider.getProvider(),
-                                                  appProvider,
-                                                  inMessage);
-                }
+            if (contextsAvailable) {
+                InjectionUtils.injectContexts(realResourceObject, cri, inMessage);
+            }
+        }
+        if (cri.isRoot()) {
+            ProviderInfo<?> appProvider = 
+                (ProviderInfo<?>)exchange.getEndpoint().get(Application.class.getName());
+            if (appProvider != null) {
+                InjectionUtils.injectContexts(appProvider.getProvider(),
+                                              appProvider,
+                                              inMessage);
             }
         }
         
-
         Method methodToInvoke = InjectionUtils.checkProxy(
             cri.getMethodDispatcher().getMethod(ori), resourceObject);
         

Copied: cxf/branches/2.7.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSCxfContinuationsTest.java
(from r1500738, cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSCxfContinuationsTest.java)
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSCxfContinuationsTest.java?p2=cxf/branches/2.7.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSCxfContinuationsTest.java&p1=cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSCxfContinuationsTest.java&r1=1500738&r2=1500816&rev=1500816&view=diff
==============================================================================
--- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSCxfContinuationsTest.java
(original)
+++ cxf/branches/2.7.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSCxfContinuationsTest.java
Mon Jul  8 16:14:24 2013
@@ -52,12 +52,6 @@ public class JAXRSCxfContinuationsTest e
         doTestContinuation("books");
     }
     
-    @Test
-    public void testContinuationSubresource() throws Exception {
-        
-        doTestContinuation("books/subresources");
-    }
-    
     private void doTestContinuation(String pathSegment) throws Exception {
         ThreadPoolExecutor executor = new ThreadPoolExecutor(1, 1, 0, TimeUnit.SECONDS,
                                                              new ArrayBlockingQueue<Runnable>(10));



Mime
View raw message