aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGert Scholten <gscholt@gmail.com>2009-12-14 23:47:58 +0100
committerGert Scholten <gscholt@gmail.com>2009-12-14 23:47:58 +0100
commit34ddd6fd7dd603f1fd6ade473bef213be9895d0e (patch)
tree2bba68c733a823287d4c4cabcaf7f20461841b78
parent95cc6e71bbbb1cf4e9991aa49d0ed505eed34d3b (diff)
downloadgwtjsonrpc-34ddd6fd7dd603f1fd6ade473bef213be9895d0e.tar.gz
Upgrade GWT dependancy to version 2.0.0.
Change-Id: I853696d3c034d14e32403967c3868c8c4fe69a4b Signed-off-by: Gert Scholten <gscholt@gmail.com>
-rw-r--r--pom.xml50
-rw-r--r--src/main/java/com/google/gwtjsonrpc/client/impl/AbstractJsonProxy.java16
-rw-r--r--src/main/java/com/google/gwtjsonrpc/client/impl/JsonSerializer.java17
3 files changed, 31 insertions, 52 deletions
diff --git a/pom.xml b/pom.xml
index f39f4b5..792dde5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -253,7 +253,7 @@ limitations under the License.
</licenses>
<properties>
- <gwtVersion>1.7.0</gwtVersion>
+ <gwtVersion>2.0.0</gwtVersion>
</properties>
<build>
@@ -312,58 +312,10 @@ limitations under the License.
<groupId>com.google.gwt</groupId>
<artifactId>gwt-dev</artifactId>
<version>${gwtVersion}</version>
- <classifier>${platform}-libs</classifier>
- <type>zip</type>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>com.google.gwt</groupId>
- <artifactId>gwt-dev</artifactId>
- <version>${gwtVersion}</version>
- <classifier>${platform}</classifier>
<scope>provided</scope>
</dependency>
</dependencies>
- <profiles>
- <profile>
- <id>gwt-dev-windows</id>
- <properties>
- <platform>windows</platform>
- </properties>
- <activation>
- <activeByDefault>true</activeByDefault>
- <os>
- <family>windows</family>
- </os>
- </activation>
- </profile>
- <profile>
- <id>gwt-dev-mac</id>
- <properties>
- <platform>mac</platform>
- </properties>
- <activation>
- <activeByDefault>false</activeByDefault>
- <os>
- <family>mac</family>
- </os>
- </activation>
- </profile>
- <profile>
- <id>gwt-dev-linux</id>
- <properties>
- <platform>linux</platform>
- </properties>
- <activation>
- <activeByDefault>false</activeByDefault>
- <os>
- <name>linux</name>
- </os>
- </activation>
- </profile>
- </profiles>
-
<repositories>
<repository>
<id>gson</id>
diff --git a/src/main/java/com/google/gwtjsonrpc/client/impl/AbstractJsonProxy.java b/src/main/java/com/google/gwtjsonrpc/client/impl/AbstractJsonProxy.java
index 9f07675..f0628f3 100644
--- a/src/main/java/com/google/gwtjsonrpc/client/impl/AbstractJsonProxy.java
+++ b/src/main/java/com/google/gwtjsonrpc/client/impl/AbstractJsonProxy.java
@@ -17,6 +17,7 @@ package com.google.gwtjsonrpc.client.impl;
import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwt.user.client.rpc.InvocationException;
+import com.google.gwt.user.client.rpc.RpcRequestBuilder;
import com.google.gwtjsonrpc.client.JsonDefTarget;
import com.google.gwtjsonrpc.client.JsonUtil;
import com.google.gwtjsonrpc.client.RemoteJsonService;
@@ -53,6 +54,21 @@ public abstract class AbstractJsonProxy implements JsonDefTarget {
xsrfManager = m;
}
+ @Override
+ public void setRpcRequestBuilder(RpcRequestBuilder builder) {
+ if (builder != null)
+ throw new UnsupportedOperationException(
+ "A RemoteJsonService does not use the RpcRequestBuilder, so this method is unsupported.");
+ /**
+ * From the gwt docs:
+ *
+ * Calling this method with a null value will reset any custom behavior to
+ * the default implementation.
+ *
+ * If builder == null, we just ignore this invocation.
+ */
+ }
+
protected <T> void doInvoke(final String methodName, final String reqData,
final ResultDeserializer<T> ser, final AsyncCallback<T> cb)
throws InvocationException {
diff --git a/src/main/java/com/google/gwtjsonrpc/client/impl/JsonSerializer.java b/src/main/java/com/google/gwtjsonrpc/client/impl/JsonSerializer.java
index 74ff69a..d55294b 100644
--- a/src/main/java/com/google/gwtjsonrpc/client/impl/JsonSerializer.java
+++ b/src/main/java/com/google/gwtjsonrpc/client/impl/JsonSerializer.java
@@ -14,6 +14,7 @@
package com.google.gwtjsonrpc.client.impl;
+import com.google.gwt.core.client.JsonUtils;
import com.google.gwtjsonrpc.client.impl.ser.JavaLangString_JsonSerializer;
/**
@@ -65,15 +66,25 @@ public abstract class JsonSerializer<T> {
*
* @param val string text requiring escaping support. Must not be null.
* @return a JSON literal text value, surrounded with double quotes.
+ * @deprecated Use {@link JsonUtils#escapeValue(String)}
*/
- public static final native String escapeString(String val)/*-{ return @com.google.gwt.json.client.JSONString::escapeValue(Ljava/lang/String;)(val); }-*/;
+ @Deprecated
+ public static final String escapeString(String val) {
+ return JsonUtils.escapeValue(val);
+ }
- /** Escape a single character, without double quotes surrounding it. */
+ /**
+ * Escape a single character, without double quotes surrounding it.
+ *
+ * @deprecated implementation depends on private method hack. Do not use.
+ */
+ @Deprecated
public static final String escapeChar(final char c) {
return escapeCharImpl(String.valueOf(c));
}
- private static final native String escapeCharImpl(String c)/*-{ return @com.google.gwt.json.client.JSONString::escapeChar(Ljava/lang/String;)(c); }-*/;
+ @Deprecated
+ private static final native String escapeCharImpl(String c) /*-{ return @com.google.gwt.core.client.JsonUtils::escapeChar(Ljava/lang/String;)(c); }-*/;
/** Return the first character of a string, or '\0' if the string is empty. */
public static final char toChar(final String val) {