summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabian Lange <lange.fabian@gmail.com>2014-08-28 19:23:15 +0300
committerLeif Åstrand <leif@vaadin.com>2014-08-28 19:29:38 +0300
commit2c3306cc9beb0366f6017d964849876337e776cd (patch)
tree324759fd8de5dd6d11a39fc3632527d780d1415c
parent5889379b447f9a8fc453fad0b95f3fbc9431d9d2 (diff)
downloadvaadin-framework-2c3306cc9beb0366f6017d964849876337e776cd.tar.gz
vaadin-framework-2c3306cc9beb0366f6017d964849876337e776cd.zip
fixes incorrect JSONArray/String usage in ServerRpcHandler (#14471)
As described by Johannes, the RPCRequest constructor first takes whole JSON as string and builds its attribute json from it (by parsing). Then it reads from this parsed JSON the array called "rpc". However it previously did a .toString on it only to re-parse it. Newer json versions complain that "rpc" is not a string, but an array. Change-Id: If4bb45abad551b183d757f0aa326c37c070ce103
-rw-r--r--server/src/com/vaadin/server/communication/ServerRpcHandler.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/server/src/com/vaadin/server/communication/ServerRpcHandler.java b/server/src/com/vaadin/server/communication/ServerRpcHandler.java
index 2f60c1a5ad..4101333071 100644
--- a/server/src/com/vaadin/server/communication/ServerRpcHandler.java
+++ b/server/src/com/vaadin/server/communication/ServerRpcHandler.java
@@ -98,9 +98,8 @@ public class ServerRpcHandler implements Serializable {
} else {
syncId = -1;
}
-
- invocations = new JSONArray(
- json.getString(ApplicationConstants.RPC_INVOCATIONS));
+ invocations = json
+ .getJSONArray(ApplicationConstants.RPC_INVOCATIONS);
}
/**