Browse Source

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
tags/7.2.7
Fabian Lange 9 years ago
parent
commit
2c3306cc9b
1 changed files with 2 additions and 3 deletions
  1. 2
    3
      server/src/com/vaadin/server/communication/ServerRpcHandler.java

+ 2
- 3
server/src/com/vaadin/server/communication/ServerRpcHandler.java View File

@@ -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);
}

/**

Loading…
Cancel
Save