From 7468c8261d186fbfb35586571c3a0728d31116e5 Mon Sep 17 00:00:00 2001 From: Leif Åstrand Date: Tue, 5 Jun 2012 11:21:20 +0300 Subject: Don't send type info from server to client (#8879) --- .../com/vaadin/terminal/gwt/server/JSONSerializerTest.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'tests/client-side/com') diff --git a/tests/client-side/com/vaadin/terminal/gwt/server/JSONSerializerTest.java b/tests/client-side/com/vaadin/terminal/gwt/server/JSONSerializerTest.java index 926f026b40..fefc2d927c 100644 --- a/tests/client-side/com/vaadin/terminal/gwt/server/JSONSerializerTest.java +++ b/tests/client-side/com/vaadin/terminal/gwt/server/JSONSerializerTest.java @@ -13,7 +13,6 @@ import java.util.Map; import junit.framework.TestCase; -import com.vaadin.external.json.JSONArray; import com.vaadin.terminal.gwt.client.communication.JsonDecoder; import com.vaadin.terminal.gwt.client.communication.JsonEncoder; import com.vaadin.terminal.gwt.client.ui.splitpanel.AbstractSplitPanelState; @@ -43,8 +42,8 @@ public class JSONSerializerTest extends TestCase { stringToStateMap.put("string - state 1", s); stringToStateMap.put("String - state 2", s2); - JSONArray encodedMap = JsonCodec.encode(stringToStateMap, null, - mapType, null); + Object encodedMap = JsonCodec.encode(stringToStateMap, null, mapType, + null); ensureDecodedCorrectly(stringToStateMap, encodedMap, mapType); } @@ -60,13 +59,13 @@ public class JSONSerializerTest extends TestCase { stateToStringMap.put(s, "string - state 1"); stateToStringMap.put(s2, "String - state 2"); - JSONArray encodedMap = JsonCodec.encode(stateToStringMap, null, - mapType, null); + Object encodedMap = JsonCodec.encode(stateToStringMap, null, mapType, + null); ensureDecodedCorrectly(stateToStringMap, encodedMap, mapType); } - private void ensureDecodedCorrectly(Object original, JSONArray encoded, + private void ensureDecodedCorrectly(Object original, Object encoded, Type type) throws Exception { Object serverSideDecoded = JsonCodec.decodeInternalOrCustomType(type, encoded, null); -- cgit v1.2.3