Skip to content

Conversation

maoling
Copy link
Member

@maoling maoling commented Sep 5, 2025

return !partitionDenylist.isKeyPermitted(keyspace, table, bytes);
}

private void checkPartitionDenylistEnabled() {
Copy link
Contributor

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()) {
Copy link
Contributor

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() {
Copy link
Contributor

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");
Copy link
Contributor

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.

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.

2 participants