Reviewers: bobv,
Description:
Remove 1.6isms from RequestFactory, and fix DynaTableRf (id's
still must be Long, and at the moment it actually counts).
Review by: robertvaw...@google.com
Please review this at http://gwt-code-reviews.appspot.com/721804/show
Affected files:
M
samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/domain/Person.java
M user/src/com/google/gwt/requestfactory/server/JsonRequestProcessor.java
M user/test/com/google/gwt/valuestore/client/RequestFactoryTest.java
Index:
samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/domain/Person.java
===================================================================
---
samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/domain/Person.java
(revision 8450)
+++
samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/domain/Person.java
(working copy)
@@ -19,20 +19,24 @@
* Hold relevant data for Person.
*/
public abstract class Person {
+ private static Long serial = 1L;
private String description = "DESC";
private String name;
+
+ private final Long id;
public Person() {
+ id = serial++;
}
public String getDescription() {
return description;
}
- public String getId() {
- return name;
+ public Long getId() {
+ return id;
}
public String getName() {
Index:
user/src/com/google/gwt/requestfactory/server/JsonRequestProcessor.java
===================================================================
--- user/src/com/google/gwt/requestfactory/server/JsonRequestProcessor.java
(revision 8450)
+++ user/src/com/google/gwt/requestfactory/server/JsonRequestProcessor.java
(working copy)
@@ -94,7 +94,6 @@
return rtn;
}
- @Override
public String decodeAndInvokeRequest(String encodedRequest) throws
Exception {
try {
return processJsonRequest(encodedRequest).toString();
@@ -524,7 +523,6 @@
return !BLACK_LIST.contains(p.getName());
}
- @Override
public void setOperationRegistry(OperationRegistry operationRegistry) {
this.operationRegistry = operationRegistry;
}
Index: user/test/com/google/gwt/valuestore/client/RequestFactoryTest.java
===================================================================
--- user/test/com/google/gwt/valuestore/client/RequestFactoryTest.java
(revision 8450)
+++ user/test/com/google/gwt/valuestore/client/RequestFactoryTest.java
(working copy)
@@ -40,10 +40,9 @@
delayTestFinish(5000);
req.simpleFooRequest().findSimpleFooById(999L).fire(
new Receiver<SimpleFooRecord>() {
- @Override
public void onSuccess(SimpleFooRecord response,
Set<SyncResult> syncResult) {
- assertEquals((int) 42, (int) response.getIntId());
+ assertEquals(42, (int) response.getIntId());
assertEquals("GWT", response.getUserName());
assertEquals(8L, (long) response.getLongField());
assertEquals(com.google.gwt.valuestore.shared.SimpleEnum.FOO,
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors