-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
8344235: Revisit SecurityManager usage in java.logging after JEP 486 and JEP 491 integration #22281
Conversation
👋 Welcome back dfuchs! A progress list of the required criteria for merging this PR into |
@dfuch This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 15 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
Webrevs
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
final Iterator<System.LoggerFinder> iterator; | ||
if (System.getSecurityManager() == null) { | ||
iterator = ServiceLoader.load(System.LoggerFinder.class, | ||
final Iterator<System.LoggerFinder> iterator = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be simply be return
... no need for a local var.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello Daniel, the changes look good to me. However, these changes appear to include both JEP 486 related updates as well as the JEP 491 (the reverting of ReentrantLock
usage in favour of synchronized
). Doing this clean up together I think is fine. However, I think we should update the issue title to also include JEP 491 in addition to JEP 486.
Oh right. I should have mentioned that in the summary. This is now done, I modified the JBS and PR titles as suggested too. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me.
/integrate |
Going to push as commit a62279c.
Your commit was automatically rebased without conflicts. |
This PR remove usage of SecurityManager, doPrivileges, etc... from
java.logging
andjava.base/jdk.internal.logger
Only notable hack - Logger.checkPermission() no longer checks permissions, but has been renamed into
ensureLogManagerInitialized()
in order to avoid disturbing the initialization sequence of Logger/LogManager.I am not 100% sure this is still needed - but I remember we had some entanglement issues in the past that had been hard to solve, so it seemed prudent to keep the call:
where
manager
is a private volatile field in Logger.I also took the opportunity to remove the locking workaround that had been introduced to support Virtual Threads and revert to using synchronized in the Handler classes now that JEP 491 has been integrated.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/22281/head:pull/22281
$ git checkout pull/22281
Update a local copy of the PR:
$ git checkout pull/22281
$ git pull https://git.openjdk.org/jdk.git pull/22281/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 22281
View PR using the GUI difftool:
$ git pr show -t 22281
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/22281.diff
Using Webrev
Link to Webrev Comment