Skip to content

Conversation

@smiklosovic
Copy link
Contributor

Thanks for sending a pull request! Here are some tips if you're new here:

  • Ensure you have added or run the appropriate tests for your PR.
  • Be sure to keep the PR description updated to reflect all changes.
  • Write your PR title to summarize what this PR proposes.
  • If possible, provide a concise example to reproduce the issue for a faster review.
  • Read our contributor guidelines
  • If you're making a documentation change, see our guide to documentation contribution

Commit messages should follow the following format:

<One sentence description, usually Jira title or CHANGES.txt summary>

<Optional lengthier description (context on patch)>

patch by <Authors>; reviewed by <Reviewers> for CASSANDRA-#####

Co-authored-by: Name1 <email1>
Co-authored-by: Name2 <email2>

The Cassandra Jira

@smiklosovic smiklosovic force-pushed the CASSANDRA-21093 branch 2 times, most recently from e9064df to 3a89145 Compare January 12, 2026 13:46
{
public static final String ENABLED_PROPERTY = "enabled";

private final Map<String, Map<String, Object>> options = new HashMap<>();

Choose a reason for hiding this comment

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

Originally interpreted Map<StartupCheckType, Map<String, Object>> as a mapping from type to a map of checks + options. I'm ok with this approach, so defer to you as the maintainer of Cassandra

Comment on lines +159 to +160
if (configMap.containsKey(ENABLED_PROPERTY))
configMap.putIfAbsent(ENABLED_PROPERTY, FALSE);

Choose a reason for hiding this comment

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

What's the purpose of this line?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

from javadoc:

If the specified key is not already associated with a value (or is mapped to null) associates it with the given value and returns null, else returns the current value.

This covers cases when there is "enabled" as a key in a map but its value is null. We do not want that. If it is ever null then we want to explicitly put there false.

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