Skip to content

[hotfix] Correct the comments for FlinkSecurityManager #26325

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
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ static FlinkSecurityManager fromConfiguration(Configuration configuration) {

boolean haltOnSystemExit = configuration.get(ClusterOptions.HALT_ON_FATAL_ERROR);

// If no check is needed, return null so that caller can avoid setting security manager not
// to incur any runtime cost.
// If no check is needed, return null so that caller can avoid setting security manager and
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: security manager -> the security manager
imho: I am not too worried about the text here - as the method javadoc seems to cover this. I would be inclined to remove this comment as it adds nothing to the javadoc. If we want to improve it, it would be better to have this comment explain why these if conditions indicate that we should not return a FlinkSecurityManager.

  • but if we change it here we should use the same words in the methods javadoc.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, the javadoc seems good enough. I think this inner comments just for readability.

// avoid any runtime overhead.
if (userSystemExitMode == ClusterOptions.UserSystemExitMode.DISABLED && !haltOnSystemExit) {
return null;
}
Expand Down