-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
MINOR: Make forceUnmap
protected since the only test class that references it is in the same package now.
#18638
Conversation
forceUnmap
protected since the only test class that references it is in the same package now.
forceUnmap
protected since the only test class that references it is in the same package now.forceUnmap
protected since the only test class that references it is in the same package now.
@divijvaidya Can you please review this? |
@@ -399,8 +399,8 @@ protected void safeForceUnmap() { | |||
/** | |||
* Forcefully free the buffer's mmap. | |||
*/ | |||
// Visible for testing, we can make this protected once OffsetIndexTest is in the same package as this class | |||
public void forceUnmap() throws IOException { | |||
// Made protected for the sake of visibility for testing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit
we usually use //visible for testing
comment for this in the code base. But it's ok to do it this way as well in this PR. Doesn't matter as long as the intent is conveyed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the feedback. I have updated the comment. Could you please re-trigger the build?
Reviewers: Divij Vaidya <[email protected]>
Reviewers: Divij Vaidya <[email protected]>
The
forceUnmap
method was made public for the sake of visibility for testing since the test classOffsetIndexTest
was in a different package before. Now, the test class is in the same package, so that method can been madeprotected
.The sole usage of this method is inside the class that it is defined in:
AbstractIndex
and the test class:OffsetIndexTest
Committer Checklist (excluded from commit message)