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

21
LINES

< > BotCompany Repo | #1016839 // cleanDefunctACCsInAllSwingComponents

JavaX fragment (include)

1  
// disabled because JDK 17
2  
3  
static LS cleanDefunctACCsInAllSwingComponents_fields = ll('acc, 'inheritedAccessControlContext);
4  
5  
svoid cleanDefunctACCsInAllSwingComponents() {
6  
  // TODO (possibly): follow Window.getInputContext() -> InputMethod -> awtFocussedComponent
7  
  
8  
  /*
9  
  for (Component c : allAWTComponents())
10  
   for (S field : cleanDefunctACCsInAllSwingComponents_fields) pcall {
11  
    AccessControlContext acc = castGetOpt(c, field);
12  
    if (acc == null) continue;
13  
    L<S> defunctIDs = acc_defunctProgramIDs(acc);
14  
    if (nempty(defunctIDs)) {
15  
      S desc = shortClassName(c);
16  
      //print("DEFUNCT ACC IN COMPONENT " + field + "! Cleaning. " + defunctIDs + ": " + desc);
17  
      set(c, field, acc_current());
18  
    }
19  
  }
20  
  */
21  
}

Author comment

Began life as a copy of #1016334

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1016839
Snippet name: cleanDefunctACCsInAllSwingComponents
Eternal ID of this version: #1016839/6
Text MD5: 0306a9afcc5733e4c6c1e14156f07d13
Author: stefan
Category: javax / maintenance
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-10-22 15:55:12
Source code size: 753 bytes / 21 lines
Pitched / IR pitched: No / No
Views / Downloads: 460 / 510
Version history: 5 change(s)
Referenced in: [show references]