RFR: 8342997: Remove use of System::getSecurityManager and SecurityManager [v6]

Kevin Rushforth kcr at openjdk.org
Wed Nov 13 22:06:12 UTC 2024


> Ths PR removes all remaining calls to `System::getSecurityManager` and the `SecurityManager` class along with the `System.getGecurityManager() != null` code paths.
> 
> As part of doing this, the last uses of `PermissionHelper` and `FXPermissions` were eliminated, so I deleted those two classes. Since `PermissionHelper` was the last remaining use of `AccessControlException`, I am adding JDK-8342998 to this PR.
> 
> In a few places, I noted some "check permissions" methods that are now no-ops that might be candidates for further cleanup (not directly related, so not planned for jfx24).
> 
> Finally, I deleted several unused methods in `MethodUtil` and `ReflectUtil` (some of these were already removed in the corresponding JDK classes, and some of them were unused after the changes to remove the call to `getSecurityManager`).

Kevin Rushforth has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains nine additional commits since the last revision:

 - Merge branch 'master' into 8342997-getSecurityManager
 - fix copy/paste error in comment
 - remove redundant override of Dragboard::getContentImpl
 - Restore mistakenly removed comment.
 - Replace 'TODO: SM removal:' comments with 'TODO: JDK-nnnnnnn:'
 - Additional cleanup of unused fields, imports, and comments related to permissions
 - Review comments: remove unused field, methods in FXMLLoader
 - 8342994: Remove security manager calls in com.sun.javafx.reflect
   Remove dead code from ReflectUtil
 - 8342997: Remove use of System::getSecurityManager and SecurityManager
   8342998: Remove all uses of AccessControlException

-------------

Changes:
  - all: https://git.openjdk.org/jfx/pull/1631/files
  - new: https://git.openjdk.org/jfx/pull/1631/files/159e204e..ba1a60d5

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jfx&pr=1631&range=05
 - incr: https://webrevs.openjdk.org/?repo=jfx&pr=1631&range=04-05

  Stats: 4098 lines in 40 files changed: 3298 ins; 632 del; 168 mod
  Patch: https://git.openjdk.org/jfx/pull/1631.diff
  Fetch: git fetch https://git.openjdk.org/jfx.git pull/1631/head:pull/1631

PR: https://git.openjdk.org/jfx/pull/1631


More information about the openjfx-dev mailing list