Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

20
LINES

< > BotCompany Repo | #1015840 // Test serializing synchronizedMap (OK for hashmap, but needs to handle cimaps etc. too)

JavaX source code (desktop) [tags: use-pretranspiled] - run with: x30.jar

Download Jar. Uses 3874K of libraries. Click here for Pure Java version (7541L/52K).

!7

p-experiment {
  Map map = synchronizedMap();
  S name = className(map);
  print(name);
  S s;
  print(s = struct(map));
  Map map2 = cast unstruct(s);
  assertEquals(name, className(map2));
  assertEquals(map, map2);
  
  map.put("a", "b");
  print(s = struct(map));
  map2 = (Map) unstruct(s);
  assertEquals(name, className(map2));
  assertEquals(map, map2);
  
  print("OK");
}

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: 249 / 737
Version history: 5 change(s)
Referenced in: [show references]