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

Refactor file descriptor handling in openFileDescriptors() #13955

Merged
merged 4 commits into from Apr 10, 2024

Conversation

Java4ye
Copy link
Contributor

@Java4ye Java4ye commented Apr 6, 2024

Motivation:

The motivation behind this change is to enhance the readability and maintainability of the codebase by refactoring the file descriptor handling in the openFileDescriptors method. By extracting the logic for closing file descriptors into a separate method, closeFileDescriptor,

Modification:

In this commit, I have refactored the openFileDescriptors method by extracting the code responsible for closing file descriptors into a separate method, closeFileDescriptor.

Result:

This PR introduces improved code organization and readability by separating the concerns of opening and closing file descriptors in the openFileDescriptors method. It does not introduce any functional changes.

Copy link
Contributor

@chrisvest chrisvest left a comment

Choose a reason for hiding this comment

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

// ignore
}
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Add a line break between this and the next method.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok,I made it up in the second commit

Copy link
Contributor

Choose a reason for hiding this comment

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

Also between this one and newTaskQueue below.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sorry,my carelessness

@Java4ye
Copy link
Contributor Author

Java4ye commented Apr 6, 2024

Did you sign the ICLA? https://netty.io/wiki/developer-guide.html

Yes, I have completed the ICLA process.

@chrisvest
Copy link
Contributor

Looks like you messed up the rebase and entangled your changes with the merge of #13942. Please fix.

@Java4ye
Copy link
Contributor Author

Java4ye commented Apr 8, 2024

Looks like you messed up the rebase and entangled your changes with the merge of #13942. Please fix.

Fixed.
Thanks.

@Java4ye Java4ye requested a review from chrisvest April 9, 2024 03:39
@chrisvest chrisvest merged commit 02b54ca into netty:4.1 Apr 10, 2024
16 checks passed
@chrisvest
Copy link
Contributor

Thanks!

chrisvest pushed a commit that referenced this pull request Apr 10, 2024
Motivation:

The motivation behind this change is to enhance the readability and
maintainability of the codebase by refactoring the file descriptor
handling in the openFileDescriptors method. By extracting the logic for
closing file descriptors into a separate method, closeFileDescriptor,

Modification:

In this commit, I have refactored the openFileDescriptors method by
extracting the code responsible for closing file descriptors into a
separate method, closeFileDescriptor.

Result:

This PR introduces improved code organization and readability by
separating the concerns of opening and closing file descriptors in the
openFileDescriptors method. It does not introduce any functional
changes.
@Java4ye Java4ye deleted the 4.1-clean-code branch April 11, 2024 02:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants