cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1491845 - in /cxf/branches/2.6.x-fixes: ./ distribution/src/main/release/samples/jax_rs/basic/src/main/java/demo/jaxrs/server/ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs...
Date Tue, 11 Jun 2013 15:45:26 GMT
Author: sergeyb
Date: Tue Jun 11 15:45:24 2013
New Revision: 1491845

URL: http://svn.apache.org/r1491845
Log:
Merged revisions 1491746 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/branches/2.7.x-fixes

................
  r1491746 | sergeyb | 2013-06-11 12:28:55 +0100 (Tue, 11 Jun 2013) | 13 lines
  
  Merged revisions 1490431,1491745 via svnmerge from 
  https://svn.apache.org/repos/asf/cxf/trunk
  
  ........
    r1490431 | sergeyb | 2013-06-06 21:33:07 +0100 (Thu, 06 Jun 2013) | 1 line
    
    Minor updates to get a demo working
  ........
    r1491745 | sergeyb | 2013-06-11 12:24:49 +0100 (Tue, 11 Jun 2013) | 1 line
    
    [CXF-5065] Setting subresource parent before the subresource gets evaluated
  ........
................

Modified:
    cxf/branches/2.6.x-fixes/   (props changed)
    cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/jax_rs/basic/src/main/java/demo/jaxrs/server/CustomerService.java
    cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/jax_rs/basic/src/main/java/demo/jaxrs/server/Order.java
    cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/jax_rs/basic/src/main/java/demo/jaxrs/server/Server.java
    cxf/branches/2.6.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/ClassResourceInfo.java
    cxf/branches/2.6.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ResourceUtils.java
    cxf/branches/2.6.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookSubresource.java

Propchange: cxf/branches/2.6.x-fixes/
------------------------------------------------------------------------------
  Merged /cxf/branches/2.7.x-fixes:r1491746
  Merged /cxf/trunk:r1490431,1491745

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

Modified: cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/jax_rs/basic/src/main/java/demo/jaxrs/server/CustomerService.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/jax_rs/basic/src/main/java/demo/jaxrs/server/CustomerService.java?rev=1491845&r1=1491844&r2=1491845&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/jax_rs/basic/src/main/java/demo/jaxrs/server/CustomerService.java
(original)
+++ cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/jax_rs/basic/src/main/java/demo/jaxrs/server/CustomerService.java
Tue Jun 11 15:45:24 2013
@@ -23,6 +23,7 @@ import java.util.Map;
 
 import javax.ws.rs.DELETE;
 import javax.ws.rs.GET;
+import javax.ws.rs.Produces;
 import javax.ws.rs.POST;
 import javax.ws.rs.PUT;
 import javax.ws.rs.Path;
@@ -30,6 +31,7 @@ import javax.ws.rs.PathParam;
 import javax.ws.rs.core.Response;
 
 @Path("/customerservice/")
+@Produces("text/xml")
 public class CustomerService {
     long currentId = 123;
     Map<Long, Customer> customers = new HashMap<Long, Customer>();

Modified: cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/jax_rs/basic/src/main/java/demo/jaxrs/server/Order.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/jax_rs/basic/src/main/java/demo/jaxrs/server/Order.java?rev=1491845&r1=1491844&r2=1491845&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/jax_rs/basic/src/main/java/demo/jaxrs/server/Order.java
(original)
+++ cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/jax_rs/basic/src/main/java/demo/jaxrs/server/Order.java
Tue Jun 11 15:45:24 2013
@@ -23,6 +23,7 @@ import java.util.Map;
 import javax.ws.rs.GET;
 import javax.ws.rs.Path;
 import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
 
 import javax.xml.bind.annotation.XmlRootElement;
 

Modified: cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/jax_rs/basic/src/main/java/demo/jaxrs/server/Server.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/jax_rs/basic/src/main/java/demo/jaxrs/server/Server.java?rev=1491845&r1=1491844&r2=1491845&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/jax_rs/basic/src/main/java/demo/jaxrs/server/Server.java
(original)
+++ cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/jax_rs/basic/src/main/java/demo/jaxrs/server/Server.java
Tue Jun 11 15:45:24 2013
@@ -38,7 +38,7 @@ public class Server {
         new Server();
         System.out.println("Server ready...");
 
-        Thread.sleep(5 * 60 * 1000);
+        Thread.sleep(5 * 6000 * 1000);
         System.out.println("Server exiting");
         System.exit(0);
     }

Modified: cxf/branches/2.6.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/ClassResourceInfo.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/ClassResourceInfo.java?rev=1491845&r1=1491844&r2=1491845&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/ClassResourceInfo.java
(original)
+++ cxf/branches/2.6.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/ClassResourceInfo.java
Tue Jun 11 15:45:24 2013
@@ -138,9 +138,6 @@ public class ClassResourceInfo extends A
                 ClassResourceInfo tmpCri = subResources.putIfAbsent(key, cri);
                 if (tmpCri != null) {
                     cri = tmpCri;
-                    if (cri != this) {
-                        cri.setParent(this);
-                    }
                 }
             }
         }
@@ -151,9 +148,6 @@ public class ClassResourceInfo extends A
         subResources.putIfAbsent(new SubresourceKey(cri.getResourceClass(), 
                                             cri.getServiceClass()),
                                  cri);
-        if (cri != this) {
-            cri.setParent(this);
-        }
     }
     
     public Collection<ClassResourceInfo> getSubResources() {
@@ -299,7 +293,7 @@ public class ClassResourceInfo extends A
         return resourceProvider != null && resourceProvider.isSingleton();
     }
 
-    void setParent(ClassResourceInfo parent) {
+    public void setParent(ClassResourceInfo parent) {
         this.parent = parent;
     }
 }

Modified: cxf/branches/2.6.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ResourceUtils.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ResourceUtils.java?rev=1491845&r1=1491844&r2=1491845&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ResourceUtils.java
(original)
+++ cxf/branches/2.6.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ResourceUtils.java
Tue Jun 11 15:45:24 2013
@@ -215,7 +215,17 @@ public final class ResourceUtils {
                                                             boolean root, 
                                                             boolean enableStatic,
                                                             Bus bus) {
+        return createClassResourceInfo(rClass, sClass, null, root, enableStatic, bus);
+    }
+    
+    public static ClassResourceInfo createClassResourceInfo(final Class<?> rClass,

+                                                            final Class<?> sClass,
+                                                            ClassResourceInfo parent,
+                                                            boolean root, 
+                                                            boolean enableStatic,
+                                                            Bus bus) {
         ClassResourceInfo cri = new ClassResourceInfo(rClass, sClass, root, enableStatic,
bus);
+        cri.setParent(parent);
 
         if (root) {
             URITemplate t = URITemplate.createTemplate(cri.getPath());
@@ -244,7 +254,7 @@ public final class ResourceUtils {
                         ClassResourceInfo subCri = cri.findResource(subClass, subClass);
                         if (subCri == null) {
                             subCri = subClass == cri.getServiceClass() ? cri
-                                     : createClassResourceInfo(subClass, subClass, false,
enableStatic,
+                                     : createClassResourceInfo(subClass, subClass, cri, false,
enableStatic,
                                                                cri.getBus());
                         }
                         

Modified: cxf/branches/2.6.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookSubresource.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookSubresource.java?rev=1491845&r1=1491844&r2=1491845&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookSubresource.java
(original)
+++ cxf/branches/2.6.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookSubresource.java
Tue Jun 11 15:45:24 2013
@@ -66,6 +66,7 @@ public interface BookSubresource {
     
     @POST
     @Path("/subresource3")
+    @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
     Book getTheBook3(@FormParam("id") String id,
                      @FormParam("name") List<String> nameParts) throws BookNotFoundFault;
     



Mime
View raw message