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

17
LINES

< > BotCompany Repo | #1005602 // Test null values in HashMap, also with structure/unstructure [works]

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

Libraryless. Click here for Pure Java version (3209L/20K/71K).

1  
!752
2  
3  
p {
4  
  // Exploring the funny areas of Java :)
5  
  
6  
  new HashMap map;
7  
  map.put("nope", null);
8  
  assertTrue(map.containsKey("nope"));
9  
  assertNull(map.get("nope"));
10  
  
11  
  map = (HashMap) unstructure(testStructureFunction(map));
12  
  
13  
  assertTrue(map.containsKey("nope"));
14  
  assertNull(map.get("nope"));
15  
  
16  
  print("OK");
17  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1005602
Snippet name: Test null values in HashMap, also with structure/unstructure [works]
Eternal ID of this version: #1005602/1
Text MD5: 2ab8749c72406e90b5766266c170ca32
Transpilation MD5: 90b7666091e59583c7081871e6658716
Author: stefan
Category: javax
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-08-01 18:38:17
Source code size: 339 bytes / 17 lines
Pitched / IR pitched: No / No
Views / Downloads: 426 / 491
Referenced in: [show references]