Skip to content
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

JDK-8282686: Add constructors taking a cause to SocketException #7705

Closed
wants to merge 4 commits into from

Conversation

jddarcy
Copy link
Member

@jddarcy jddarcy commented Mar 4, 2022

Please review this small API enhancement to add the usual constructors taking a cause to SocketException and then update uses of initiCause on creating SocketException to instead pass the cause via the constructor.

Please also review the CSR: https://bugs.openjdk.java.net/browse/JDK-8282688


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed
  • Change requires a CSR request to be approved

Issues

  • JDK-8282686: Add constructors taking a cause to SocketException
  • JDK-8282688: Add constructors taking a cause to SocketException (CSR)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/7705/head:pull/7705
$ git checkout pull/7705

Update a local copy of the PR:
$ git checkout pull/7705
$ git pull https://git.openjdk.java.net/jdk pull/7705/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 7705

View PR using the GUI difftool:
$ git pr show -t 7705

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/7705.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Mar 4, 2022

👋 Welcome back darcy! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot added the rfr Pull request is ready for review label Mar 4, 2022
@openjdk
Copy link

openjdk bot commented Mar 4, 2022

@jddarcy The following labels will be automatically applied to this pull request:

  • net
  • nio
  • security

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added security security-dev@openjdk.org nio nio-dev@openjdk.org net net-dev@openjdk.org labels Mar 4, 2022
@jddarcy
Copy link
Member Author

jddarcy commented Mar 4, 2022

/csr

@openjdk openjdk bot added the csr Pull request needs approved CSR before integration label Mar 4, 2022
@openjdk
Copy link

openjdk bot commented Mar 4, 2022

@jddarcy this pull request will not be integrated until the CSR request JDK-8282688 for issue JDK-8282686 has been approved.

@jddarcy jddarcy changed the title JDK-8282686: Add constructors take a cause to SocketException JDK-8282686: Add constructors taking a cause to SocketException Mar 4, 2022
@mlbridge
Copy link

mlbridge bot commented Mar 4, 2022

Webrevs

Copy link
Contributor

@AlanBateman AlanBateman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good, I just wonder if we should add a test for the new constructors. One of them will be tested by the usages in the JDK, the cause-only constructor may not be exercised by any code.

Copy link
Member

@XueleiFan XueleiFan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. I may file a new RFE and use this constructor in the JSSE implementation.

Copy link
Contributor

@LanceAndersen LanceAndersen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine, would be worth including a couple of tests for coverage

@openjdk openjdk bot removed the csr Pull request needs approved CSR before integration label Mar 5, 2022
@openjdk
Copy link

openjdk bot commented Mar 5, 2022

@jddarcy 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:

8282686: Add constructors taking a cause to SocketException

Reviewed-by: alanb, xuelei, lancea, dfuchs

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 4 new commits pushed to the master branch:

  • 7194097: 8252577: HotSpot Style Guide should link to One-True-Brace-Style description
  • ef266d7: 8278296: Generalize long range check transformation
  • f0995ab: 8280404: Unexpected exception thrown when CEN file entry comment length is not valid
  • 8e70f4c: 8282224: Correct TIG::bang_stack_shadow_pages comments

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
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 master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Mar 5, 2022
dfuch
dfuch approved these changes Mar 7, 2022
@jddarcy
Copy link
Member Author

jddarcy commented Mar 7, 2022

/integrate

@openjdk
Copy link

openjdk bot commented Mar 7, 2022

Going to push as commit 1faa5c8.
Since your change was applied there have been 4 commits pushed to the master branch:

  • 7194097: 8252577: HotSpot Style Guide should link to One-True-Brace-Style description
  • ef266d7: 8278296: Generalize long range check transformation
  • f0995ab: 8280404: Unexpected exception thrown when CEN file entry comment length is not valid
  • 8e70f4c: 8282224: Correct TIG::bang_stack_shadow_pages comments

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Mar 7, 2022
@openjdk openjdk bot closed this Mar 7, 2022
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Mar 7, 2022
@openjdk
Copy link

openjdk bot commented Mar 7, 2022

@jddarcy Pushed as commit 1faa5c8.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

import java.net.SocketException;
import java.util.Objects;

public class TestSocketExceptionCtor {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is a good name for the test because it tests mores than the constructors. So I think drop the suffix from the name.

@AlanBateman
Copy link
Contributor

Hmm, this seems to have been integrated without any Reviewer on the final commit. How did that happen?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integrated Pull request has been integrated net net-dev@openjdk.org nio nio-dev@openjdk.org security security-dev@openjdk.org
5 participants