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

11
LINES

< > BotCompany Repo | #1031168 // Reproduce reflection problem in newer JDK with structure(synchronizedMap())

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

Download Jar. Libraryless. Click here for Pure Java version (11121L/72K).

1  
!7
2  
3  
// If you don't add the add-opens and allow-illegal-access crap
4  
// in the Java command line, this will fail.
5  
6  
p-exp {
7  
  vmBus_snoopToPrint(msg -> eq(msg, "makeAccessible_error"));
8  
  assertEqualsVerbose("sync hm{}", structure(synchronizedMap()));
9  
  assertTrueVerbose(unstructure("sync hm{}") instanceof SynchronizedMap);
10  
  print("OK");
11  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt

No comments. add comment

Snippet ID: #1031168
Snippet name: Reproduce reflection problem in newer JDK with structure(synchronizedMap())
Eternal ID of this version: #1031168/5
Text MD5: 89ea8500f265967ab8c46fe7515d4a74
Transpilation MD5: 455d3bac93224b8eabf526f2019a45e5
Author: stefan
Category: javax
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-05-16 18:16:02
Source code size: 350 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 112 / 570
Version history: 4 change(s)
Referenced in: [show references]