-
Notifications
You must be signed in to change notification settings - Fork 5.8k
8344217: Remove calls to SecurityManager and doPrivileged in java.net.DatagramSocket and java.net.NetMulticastSocket after JEP 486 integration #22303
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
Conversation
….net.DatagramSocket and java.net.NetMulticastSocket after JEP 486 integration
/csr required |
👋 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 19 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 fine.
* matching the packet's and the socket's address and port. On a send | ||
* operation, if the packet's address is set and the packet's address | ||
* <p> When a socket is connected, additional checks are performed | ||
* on a send operation: if the packet's address is set and the packet's address |
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.
Yes, an oversight that the "Care should be taken ..." wasn't removed as part of JEP 486.
Opinions may differ but I think it may be simpler to remove this sentence completely rather than re-word it. The right place to specify that send may throw IAE is in the send method description and is already does this.
If you do want to keep something it could be reduced down to: "When the socket is connected, the send method checks that the packet's address matches the remote address that the socket is connected to", no need to say anything about IAE.
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.
Thanks Alan. Done. I have also updated the CSR.
// explicitFilter may be set to 'true' at connect() time and will | ||
// be set to 'false' in disconnect() - or when there's no more | ||
// pending packets to filter. If explicitFilter is true, | ||
// it means we're connected. | ||
if (explicitFilter) { |
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.
Maybe some day we will be able to re-visit this and just have connect flush any pending datagrams.
/integrate |
Going to push as commit 519bb26.
Your commit was automatically rebased without conflicts. |
Please find here a patch that removes use of SecurityManager and doPrivileged in DatagramSocket/MulticastSocket implementation.
Some allusion to the SecurityManager was missed in DatagramSocket::connect, so this patch contains a small API documentation change that will require a CSR.
Progress
Issues
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/22303/head:pull/22303
$ git checkout pull/22303
Update a local copy of the PR:
$ git checkout pull/22303
$ git pull https://git.openjdk.org/jdk.git pull/22303/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 22303
View PR using the GUI difftool:
$ git pr show -t 22303
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/22303.diff
Using Webrev
Link to Webrev Comment