camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r1360583 - in /camel/trunk/components/camel-cxf/src: main/java/org/apache/camel/component/cxf/jaxrs/ test/java/org/apache/camel/component/cxf/ test/java/org/apache/camel/component/cxf/jaxrs/testbean/
Date Thu, 12 Jul 2012 08:50:20 GMT
Author: ningjiang
Date: Thu Jul 12 08:50:19 2012
New Revision: 1360583

URL: http://svn.apache.org/viewvc?rev=1360583&view=rev
Log:
Fixed the CS errors of camel-cxf components

Modified:
    camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CamelResourceProvider.java
    camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsEndpoint.java
    camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/SubResourceClassInvocationHandler.java
    camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfPayLoadBareSoapTest.java
    camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/testbean/CustomerServiceResource.java

Modified: camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CamelResourceProvider.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CamelResourceProvider.java?rev=1360583&r1=1360582&r2=1360583&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CamelResourceProvider.java
(original)
+++ camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CamelResourceProvider.java
Thu Jul 12 08:50:19 2012
@@ -41,10 +41,8 @@ public class CamelResourceProvider imple
             result = provider.getInstance(m);
         } else {
             // create the instance with the invoker
-        	result = Proxy.newProxyInstance(
-				    clazz.getClassLoader(),
-				    new Class[]{clazz},
-				    new SubResourceClassInvocationHandler());
+            result = Proxy.newProxyInstance(clazz.getClassLoader(), new Class[] {clazz},
+                                            new SubResourceClassInvocationHandler());
         }
         return result;
     }

Modified: camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsEndpoint.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsEndpoint.java?rev=1360583&r1=1360582&r2=1360583&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsEndpoint.java
(original)
+++ camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsEndpoint.java
Thu Jul 12 08:50:19 2012
@@ -142,8 +142,8 @@ public class CxfRsEndpoint extends Defau
         if (getResourceClasses() != null) {
             List<Class<?>> res = CastUtils.cast(getResourceClasses());
             // setup the resource providers
-            for(Class<?>clazz : res) {
-            	sfb.setResourceProvider(clazz, new CamelResourceProvider(clazz));
+            for (Class<?> clazz : res) {
+                sfb.setResourceProvider(clazz, new CamelResourceProvider(clazz));
             }
             sfb.setResourceClasses(res);
         }

Modified: camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/SubResourceClassInvocationHandler.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/SubResourceClassInvocationHandler.java?rev=1360583&r1=1360582&r2=1360583&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/SubResourceClassInvocationHandler.java
(original)
+++ camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/SubResourceClassInvocationHandler.java
Thu Jul 12 08:50:19 2012
@@ -25,27 +25,24 @@ import org.apache.cxf.jaxrs.utils.Resour
 // This class only return the sub class instance
 public class SubResourceClassInvocationHandler implements InvocationHandler {
 
-	@Override
-	public Object invoke(Object proxy, Method method, Object[] parameters)
-			throws Throwable {
-		Object result = null;
-		Class<?> returnType = method.getReturnType();
-		System.out.println("returnType class " + returnType);
-		if (!returnType.isAssignableFrom(Void.class)) {
-			// create a instance to return
-			if (returnType.isInterface()) {
-				// create a new proxy for it
-				result =  Proxy.newProxyInstance(
-					    returnType.getClassLoader(),
-					    new Class[]{returnType},
-					    new SubResourceClassInvocationHandler());
-			} else {
-				// get the constructor and create a new instance
-				Constructor<?> c = ResourceUtils.findResourceConstructor(returnType, true);
-				result =  c.newInstance(new Object[]{});
-			}
-		}
-		return result;
-	}
+    @Override
+    public Object invoke(Object proxy, Method method, Object[] parameters) throws Throwable
{
+        Object result = null;
+        Class<?> returnType = method.getReturnType();
+        System.out.println("returnType class " + returnType);
+        if (!returnType.isAssignableFrom(Void.class)) {
+            // create a instance to return
+            if (returnType.isInterface()) {
+                // create a new proxy for it
+                result = Proxy.newProxyInstance(returnType.getClassLoader(), new Class[]
{returnType},
+                                                new SubResourceClassInvocationHandler());
+            } else {
+                // get the constructor and create a new instance
+                Constructor<?> c = ResourceUtils.findResourceConstructor(returnType,
true);
+                result = c.newInstance(new Object[] {});
+            }
+        }
+        return result;
+    }
 
 }

Modified: camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfPayLoadBareSoapTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfPayLoadBareSoapTest.java?rev=1360583&r1=1360582&r2=1360583&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfPayLoadBareSoapTest.java
(original)
+++ camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfPayLoadBareSoapTest.java
Thu Jul 12 08:50:19 2012
@@ -75,7 +75,7 @@ public class CxfPayLoadBareSoapTest exte
 
     @WebService
     @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
-    public static interface BareSoapService {
+    public interface BareSoapService {
         void doSomething();
     }
 

Modified: camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/testbean/CustomerServiceResource.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/testbean/CustomerServiceResource.java?rev=1360583&r1=1360582&r2=1360583&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/testbean/CustomerServiceResource.java
(original)
+++ camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/testbean/CustomerServiceResource.java
Thu Jul 12 08:50:19 2012
@@ -29,10 +29,10 @@ public interface CustomerServiceResource
 
     @GET
     @Path("/customers/{id}/")
-    public Customer getCustomer(@PathParam("id") String id);
+    Customer getCustomer(@PathParam("id") String id);
 
     @PUT
     @Path("/customers/")
-    public Response updateCustomer(Customer customer);
+    Response updateCustomer(Customer customer);
 }
 // END SNIPPET: example



Mime
View raw message