-
Notifications
You must be signed in to change notification settings - Fork 3.8k
CASSANDRA-20892: Don't allow JMX operations for denylist when denylist is disabled #4366
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
base: trunk
Are you sure you want to change the base?
Conversation
maoling
commented
Sep 5, 2025
- more details in the CASSANDRA-20892
return !partitionDenylist.isKeyPermitted(keyspace, table, bytes); | ||
} | ||
|
||
private void checkPartitionDenylistEnabled() { |
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.
braces on new line
} | ||
|
||
private void checkPartitionDenylistEnabled() { | ||
if (!getPartitionDenylistEnabled()) { |
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.
braces for one line is not necessary
return !partitionDenylist.isKeyPermitted(keyspace, table, bytes); | ||
} | ||
|
||
private void checkPartitionDenylistEnabled() { |
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.
I would rename it to ensurePartitionDenylistEnabled
|
||
private void checkPartitionDenylistEnabled() { | ||
if (!getPartitionDenylistEnabled()) { | ||
throw new UnsupportedOperationException("Denylisting partitions is disabled"); |
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.
I am not sure this is the most appropriate one. This looks like the code is not there yet. RuntimeException
is probably just enough.