Forces HTTPRequestImpl to always send an empty string rather than a null.  This makes the generated proxy code do the right thing on a failure.

Found by: jlabanca
Review by: mmendez (desk check)


git-svn-id: https://google-web-toolkit.googlecode.com/svn/releases/1.4@1393 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/branch-info.txt b/branch-info.txt
index efec84e..2f0a2e1 100644
--- a/branch-info.txt
+++ b/branch-info.txt
@@ -8,3 +8,4 @@
 - Fixed benchmark viewer to tolerate null source code. (r1389)

 - Removed html message from *.cache.html script frames. (r1390)

 - GWTShellServlet's getResource() emulation now correctly finds resources on the servlet's module's public path. (r1391)

+- Force HTTPRequestImpl to always send an empty string rather than a null. (r1393)

diff --git a/user/src/com/google/gwt/user/client/impl/HTTPRequestImpl.java b/user/src/com/google/gwt/user/client/impl/HTTPRequestImpl.java
index b41da81..fda3989 100644
--- a/user/src/com/google/gwt/user/client/impl/HTTPRequestImpl.java
+++ b/user/src/com/google/gwt/user/client/impl/HTTPRequestImpl.java
@@ -69,7 +69,7 @@
       xmlHttp.onreadystatechange = function() {
         if (xmlHttp.readyState == 4) {
           xmlHttp.onreadystatechange = @com.google.gwt.user.client.impl.HTTPRequestImpl::nullFunc;
-          handler.@com.google.gwt.user.client.ResponseTextHandler::onCompletion(Ljava/lang/String;)(xmlHttp.responseText);
+          handler.@com.google.gwt.user.client.ResponseTextHandler::onCompletion(Ljava/lang/String;)(xmlHttp.responseText || "");
         }
       };
       xmlHttp.send('');
@@ -89,7 +89,7 @@
       xmlHttp.onreadystatechange = function() {
         if (xmlHttp.readyState == 4) {
           xmlHttp.onreadystatechange = @com.google.gwt.user.client.impl.HTTPRequestImpl::nullFunc;
-          handler.@com.google.gwt.user.client.ResponseTextHandler::onCompletion(Ljava/lang/String;)(xmlHttp.responseText);
+          handler.@com.google.gwt.user.client.ResponseTextHandler::onCompletion(Ljava/lang/String;)(xmlHttp.responseText || "");
         }
       };
       xmlHttp.send(postData);