Download Jar. Uses 3874K of libraries. Click here for Pure Java version (7541L/52K).
1 | !7 |
2 | |
3 | p-experiment {
|
4 | Map map = synchronizedMap(); |
5 | S name = className(map); |
6 | print(name); |
7 | S s; |
8 | print(s = struct(map)); |
9 | Map map2 = cast unstruct(s); |
10 | assertEquals(name, className(map2)); |
11 | assertEquals(map, map2); |
12 | |
13 | map.put("a", "b");
|
14 | print(s = struct(map)); |
15 | map2 = (Map) unstruct(s); |
16 | assertEquals(name, className(map2)); |
17 | assertEquals(map, map2); |
18 | |
19 | print("OK");
|
20 | } |
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1015840 |
| Snippet name: | Test serializing synchronizedMap (OK for hashmap, but needs to handle cimaps etc. too) |
| Eternal ID of this version: | #1015840/6 |
| Text MD5: | 01e0fd7e63cb4056c29cf277b4a44f73 |
| Transpilation MD5: | 879fb408001367adf365a5f666d060e5 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX source code (desktop) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2018-05-28 18:12:38 |
| Source code size: | 404 bytes / 20 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 650 / 1668 |
| Version history: | 5 change(s) |
| Referenced in: | [show references] |