Skip to content

8294399: (ch) Refactor some methods out of sun.nio.ch.UnixFileDispatcherImpl #3631

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

shruacha1234
Copy link
Contributor

@shruacha1234 shruacha1234 commented Jun 11, 2025

Signed-off-by: Shruthi [email protected]

OpenJDK PR : openjdk/jdk#10434
OpenJDK bug : https://bugs.openjdk.org/browse/JDK-8294399

The original patch does not apply cleanly to JDK17u-dev, as UnixFileDispatcherImpl.java and UnixFileDispatcherImpl.c do not exist in this version.
Instead, JDK 17 uses FileDispatcherImpl.java and FileDispatcherImpl.c under the unix directory for the relevant implementation.
Therefore, the changes were applied manually to align with the JDK 17 structure.


Progress

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

Issue

  • JDK-8294399: (ch) Refactor some methods out of sun.nio.ch.UnixFileDispatcherImpl (Enhancement - P4 - Rejected)

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 3631

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Jun 11, 2025

👋 Welcome back shruacha1234! 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

openjdk bot commented Jun 11, 2025

❗ 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 d6678952a6de4e5435dab65e7029021832454857 8294399: (ch) Refactor some methods out of sun.nio.ch.UnixFileDispatcherImpl Jun 11, 2025
@openjdk
Copy link

openjdk bot commented Jun 11, 2025

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

@openjdk openjdk bot added backport rfr Pull request is ready for review labels Jun 11, 2025
@shruacha1234
Copy link
Contributor Author

@AlanBateman Can you please review this PR

@mlbridge
Copy link

mlbridge bot commented Jun 11, 2025

Webrevs

@openjdk openjdk bot added the approval label Jun 11, 2025
@GoeLin
Copy link
Member

GoeLin commented Jun 16, 2025

Hi @shruacha1234
please follow the instructions in https://wiki.openjdk.org/display/JDKUpdates/How+to+contribute+or+backport+a+fix
of how to backport a fix.
Explain in the description above why this is not clean.
First get a review before you apply for fix-request. Maybe you find someone else than Alan, doesn't IBM have some engineers with reviewer status in the updates project?
Add an elaborate fix-request comment.

@openjdk openjdk bot removed the approval label Jun 16, 2025
@shruacha1234
Copy link
Contributor Author

/approval 8294399 request the backport fix. The FileDispatcherImpl class includes native methods close0(), dup0(), and preClose0(), which are commented as:

// Shared with SocketDispatcher and DatagramDispatcher but NOT used by FileDispatcherImpl

These methods are being relocated to a new class, UnixDispatcher, which is referenced by both SocketDispatcher and DatagramDispatcher, where the methods are actually used.
Additionally, the FileDispatcherImpl class contains preClose() and dup() methods that are not invoked anywhere and can therefore be safely removed.

@openjdk
Copy link

openjdk bot commented Jul 2, 2025

@shruacha1234
8294399: The approval request has been created successfully.

@openjdk openjdk bot added the approval label Jul 2, 2025
Copy link

@galderz galderz left a comment

Choose a reason for hiding this comment

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

The changes look fine to me. The changes that were originally UnixFileDispatcherImpl.[java/c] align with the ones in FileDispatcherImpl.[java/c].

What testing have you done to validate the changes? Once that is explained and validated I'll approve.

@openjdk openjdk bot removed the approval label Jul 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport rfr Pull request is ready for review
Development

Successfully merging this pull request may close these issues.

3 participants