diff --git a/wsdef/src/main/java/com/google/gson/webservice/definition/ParamMap.java b/wsdef/src/main/java/com/google/gson/webservice/definition/ParamMap.java index 7f66cbf3..d4b0c2fe 100644 --- a/wsdef/src/main/java/com/google/gson/webservice/definition/ParamMap.java +++ b/wsdef/src/main/java/com/google/gson/webservice/definition/ParamMap.java @@ -41,7 +41,7 @@ class ParamMap { } public Builder put(String paramName, Object content, Type typeOfContent) { - spec.checkIfCompatible(paramName, typeOfContent); + Preconditions.checkArgument(spec.checkIfCompatible(paramName, typeOfContent)); contents.put(paramName, content); return this; } diff --git a/wsdef/src/main/java/com/google/gson/webservice/definition/RequestBody.java b/wsdef/src/main/java/com/google/gson/webservice/definition/RequestBody.java index 6afa8ead..593921ca 100644 --- a/wsdef/src/main/java/com/google/gson/webservice/definition/RequestBody.java +++ b/wsdef/src/main/java/com/google/gson/webservice/definition/RequestBody.java @@ -23,6 +23,8 @@ import java.util.Map; * in the output stream of the request (for example, with * {@link java.net.HttpURLConnection#getOutputStream()}) , and is read by the * {@link javax.servlet.http.HttpServletRequest#getInputStream()}. + * This class omits the default constructor for use by Gson. Instead the user must use + * {@link com.google.gson.webservice.typeadapters.RequestBodyGsonConverter} * * @author inder */ diff --git a/wsdef/src/main/java/com/google/gson/webservice/definition/ResponseBody.java b/wsdef/src/main/java/com/google/gson/webservice/definition/ResponseBody.java index dcc18b81..13b6e17c 100644 --- a/wsdef/src/main/java/com/google/gson/webservice/definition/ResponseBody.java +++ b/wsdef/src/main/java/com/google/gson/webservice/definition/ResponseBody.java @@ -20,7 +20,9 @@ import java.util.Map; /** * body of the response. This is written out as JSON to be sent out to the client. - * + * This class omits the default constructor for use by Gson. Instead the user must use + * {@link com.google.gson.webservice.typeadapters.ResponseBodyGsonConverter} + * * @author inder */ public final class ResponseBody extends ContentBody { @@ -46,7 +48,6 @@ public final class ResponseBody extends ContentBody { } } - private ResponseBody(ResponseBodySpec spec, Map contents) { super(spec, contents); }