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

8235139: Deprecate the socket impl factory mechanism #2375

Closed
wants to merge 9 commits into from

Conversation

@pconcannon
Copy link
Contributor

@pconcannon pconcannon commented Feb 3, 2021

Hi,

Could someone please review my proposed changeset for JDK-8235139: 'Remove the socket impl factory mechanism' ?

These changes propose to deprecate (for the eventual removal) the API points for statically configuring a system-wide factory for the Socket, ServerSocket, and DatagramSocket types in the java.net package. Specifically, the following:

Methods:

  • static void Socket.setSocketImplFactory​(SocketImplFactory fac)
  • static void ServerSocket.setSocketFactory​(SocketImplFactory fac)
  • static void DatagramSocket.setDatagramSocketImplFactory​(DatagramSocketImplFactory fac)

Types:

  • java.net SocketImplFactory
  • java.net DatagramSocketImplFactory

The CSR for JDK-8220494 contains some verbiage about the potential
issues that setting factories can have, and alludes to their possible
future removal.

The CSR for this issue can be viewed here: https://bugs.openjdk.java.net/browse/JDK-8261228

Kind regards,
Patrick


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8235139: Deprecate the socket impl factory mechanism

Reviewers

Download

$ git fetch https://git.openjdk.java.net/jdk pull/2375/head:pull/2375
$ git checkout pull/2375

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Feb 3, 2021

👋 Welcome back pconcannon! 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 label Feb 3, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Feb 3, 2021

@pconcannon The following label will be automatically applied to this pull request:

  • net

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

@openjdk openjdk bot added the net label Feb 3, 2021
@mlbridge
Copy link

@mlbridge mlbridge bot commented Feb 3, 2021

@dfuch
Copy link
Member

@dfuch dfuch commented Feb 3, 2021

/csr needed

@openjdk openjdk bot added the csr label Feb 3, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Feb 3, 2021

@dfuch has indicated that a compatibility and specification (CSR) request is needed for this pull request.
@pconcannon please create a CSR request and add link to it in JDK-8235139. This pull request cannot be integrated until the CSR request is approved.

@dfuch
Copy link
Member

@dfuch dfuch commented Feb 3, 2021

The title of the JBS issue should probably be renamed to "Deprecate the socket impl factory mechanism"... Maybe wait on further feedback before actually making this change.

Copy link
Contributor

@AlanBateman AlanBateman left a comment

Deprecating the 3 static factory methods is good.
I see you've also added the Deprecated annotation to the private static fields too. Is this left over from a previous iteration?

@dfuch
Copy link
Member

@dfuch dfuch commented Feb 4, 2021

I see you've also added the Deprecated annotation to the private static fields too. Is this left over from a previous iteration?

Humm... Good point! That might not been needed. I believe we experimented with deprecating the XXXSocketFactoryImpl interfaces too at some point, and that might be a left over from these experiments. If we remove this then we can probably remove the @SuppressWarnings too!

@dfuch
dfuch approved these changes Feb 5, 2021
Copy link
Member

@ChrisHegarty ChrisHegarty left a comment

This looks good. Maybe update the bug description from "Remove" to "Deprecate".

@pconcannon pconcannon changed the title 8235139: Remove the socket impl factory mechanism 8235139: Deprecate the socket impl factory mechanism Feb 5, 2021
@dfuch
dfuch approved these changes Feb 8, 2021
@openjdk openjdk bot removed the csr label Feb 9, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Feb 9, 2021

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

8235139: Deprecate the socket impl factory mechanism

Reviewed-by: dfuchs, alanb, chegar

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

  • ef7ee3f: 8225081: Remove Telia Company CA certificate expiring in April 2021
  • 7c565f8: 8261209: isStandalone property: remove dependency on pretty-print
  • 01d9280: 8261299: Use-after-free on failure path in LinuxPackage.c, getJvmLauncherLibPath
  • a00b130: 8261356: Clean up enum G1Mark
  • becee64: 8261279: sun/util/resources/cldr/TimeZoneNamesTest.java timed out
  • f395ee0: 8261306: ServiceLoader documentation has malformed Unicode escape
  • 8f4c15f: 8198540: Dynalink leaks memory when generating type converters
  • edd5fc8: 8261096: Convert jlink tool to use Stream.toList()
  • 2f893c2: 8260337: Optimize ImageReader lookup, used by Class.getResource
  • f0bd9db: 8257569: Failure observed with JfrVirtualMemory::initialize
  • ... and 21 more: https://git.openjdk.java.net/jdk/compare/d0a8f2f737cdfc1ae742d47f2dd4f2bbc03f4398...master

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 label Feb 9, 2021
@pconcannon
Copy link
Contributor Author

@pconcannon pconcannon commented Feb 11, 2021

/integrate

@openjdk openjdk bot closed this Feb 11, 2021
@openjdk openjdk bot added integrated and removed ready rfr labels Feb 11, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Feb 11, 2021

@pconcannon Since your change was applied there have been 47 commits pushed to the master branch:

  • 49cf13d: 8261449: Micro-optimize JVM_LatestUserDefinedLoader
  • 837bd89: 8261548: ProblemList runtime/NMT/CheckForProperDetailStackTrace.java
  • adca84c: 8260341: CDS dump VM init code does not check exceptions
  • 447db62: 6211198: ICC_Profile.getInstance(byte[]): IAE is not specified
  • cc5691c: 8248162: serviceability/attach/RemovingUnixDomainSocketTest.java failed
  • 40754f1: 4841153: java.awt.geom.Rectangle2D.add(double,double) documented incorrectly
  • 4caeb39: 8260380: Upgrade to LittleCMS 2.12
  • a772639: 8261298: LinuxPackage.c, getJvmLauncherLibPath RPM->DEB typo
  • 52fc01b: 8261268: LOAD_INSTANCE placeholders unneeded for parallelCapable class loaders
  • a3d6e37: 8261302: NMT: Improve malloc site table hashing
  • ... and 37 more: https://git.openjdk.java.net/jdk/compare/d0a8f2f737cdfc1ae742d47f2dd4f2bbc03f4398...master

Your commit was automatically rebased without conflicts.

Pushed as commit 1662373.

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

@pconcannon pconcannon deleted the pconcannon:JDK-8235139 branch Feb 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
4 participants