Skip to content

8259662: Don't wrap SocketExceptions into SSLExceptions in SSLSocketImpl#808

Open
jerboaa wants to merge 1 commit into
openjdk:masterfrom
jerboaa:8259662-dont-wrap-socketexcpn-8u
Open

8259662: Don't wrap SocketExceptions into SSLExceptions in SSLSocketImpl#808
jerboaa wants to merge 1 commit into
openjdk:masterfrom
jerboaa:8259662-dont-wrap-socketexcpn-8u

Conversation

@jerboaa
Copy link
Copy Markdown
Contributor

@jerboaa jerboaa commented May 22, 2026

Unclean backport but should be fairly safe in prep for a cleaner backport of JDK-8284047. The patch is not clean because:

  • JDK-8239798: SSLSocket closes socket both socket endpoints on a SocketTimeoutException is not in 8u and this seems a fairly high-risk backport. Instead I've added relevant catch statements manually.
  • test/jdk/java/net/httpclient/InvalidSSLContextTest.java not in 8u. httpclient is 11+
  • missing import of SocketException in jdk/test/sun/security/ssl/SSLSocketImpl/SocketExceptionForSocketIssues.java and jdk/test/javax/net/ssl/SSLSession/TestEnabledProtocols.java
  • changed paths to 11u

In general the changes are fairly triavial to resolve.

Testing

  • jdk/test/javax/net/ssl jdk/test/sun/net/www/protocol/https/ jdk/test/sun/security/ssl/ tests. No change to master[1].

Thoughts?

[1]

Test results: passed: 261; failed: 2; error: 1

Failures/Errors are:

sun/security/ssl/X509KeyManager/PreferredKey.java => fails in master too. Preexisting.
sun/security/ssl/SSLSocketImpl/SSLSocketLeak.java => Error. Use -nativepath to specify the location of native code. Preexisting.
javax/net/ssl/compatibility/Compatibility.java => fails compilation on UseCase.java. Preexisting.



Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • JDK-8259662 needs maintainer approval
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change requires CSR request JDK-8259847 to be approved

Issues

  • JDK-8259662: Don't wrap SocketExceptions into SSLExceptions in SSLSocketImpl (Bug - P4)
  • JDK-8259847: Don't wrap SocketExceptions into SSLExceptions in SSLSocketImpl (CSR)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk8u-dev.git pull/808/head:pull/808
$ git checkout pull/808

Update a local copy of the PR:
$ git checkout pull/808
$ git pull https://git.openjdk.org/jdk8u-dev.git pull/808/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 808

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk8u-dev/pull/808.diff

Using Webrev

Link to Webrev Comment

8259662: Don't wrap SocketExceptions into SSLExceptions in SSLSocketImpl
@bridgekeeper
Copy link
Copy Markdown

bridgekeeper Bot commented May 22, 2026

👋 Welcome back sgehwolf! 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
Copy link
Copy Markdown

openjdk Bot commented May 22, 2026

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk openjdk Bot changed the title Backport 3aa7dcd2671ab596d1205ea2c78352eae2ce608a 8259662: Don't wrap SocketExceptions into SSLExceptions in SSLSocketImpl May 22, 2026
@openjdk
Copy link
Copy Markdown

openjdk Bot commented May 22, 2026

This backport pull request has now been updated with issue from the original commit.

@openjdk openjdk Bot added backport Port of a pull request already in a different code base rfr Pull request is ready for review labels May 22, 2026
@mlbridge
Copy link
Copy Markdown

mlbridge Bot commented May 22, 2026

Webrevs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport Port of a pull request already in a different code base rfr Pull request is ready for review

Development

Successfully merging this pull request may close these issues.

1 participant