Revision: 8119
Author: [email protected]
Date: Wed May 12 15:12:40 2010
Log: Factored out the invoke method for a READ request.

Patch by: [email protected]
Commited by: amitmanjhi
Review by: amitmanjhi

Review at http://gwt-code-reviews.appspot.com/519801

http://code.google.com/p/google-web-toolkit/source/detail?r=8119

Modified:
/branches/2.1/bikeshed/src/com/google/gwt/requestfactory/server/RequestFactoryServlet.java

=======================================
--- /branches/2.1/bikeshed/src/com/google/gwt/requestfactory/server/RequestFactoryServlet.java Wed May 12 09:47:07 2010 +++ /branches/2.1/bikeshed/src/com/google/gwt/requestfactory/server/RequestFactoryServlet.java Wed May 12 15:12:40 2010
@@ -130,7 +130,7 @@
         Object args[] = RequestDataManager.getObjectsFromParameterMap(
             getParameterMap(topLevelJsonObject),
             domainMethod.getParameterTypes());
-        Object result = domainMethod.invoke(null, args);
+        Object result = invokeStaticDomainMethod(domainMethod, args);

         if ((result instanceof List<?>) != operation.isReturnTypeList()) {
           throw new IllegalArgumentException(String.format(
@@ -568,6 +568,11 @@
     }
     return violationsAsJson;
   }
+
+  private Object invokeStaticDomainMethod(Method domainMethod,
+ Object args[]) throws IllegalAccessException, InvocationTargetException {
+    return domainMethod.invoke(null, args);
+  }

   /**
* returns true if the property has been requested. TODO: use the properties

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to