Skip to content

refactor: clean namespaces constants #1206

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

Merged
merged 3 commits into from
May 11, 2022
Merged

Conversation

metacosm
Copy link
Collaborator

  • refactor!: move SAME_AS_CONTROLLER constant to Constants class, add set
  • refactor!: rename WATCH_CURRENT_NAMESPACE_SET to match other constants

@metacosm metacosm self-assigned this May 10, 2022
@metacosm metacosm requested a review from csviri May 10, 2022 20:28
@@ -7,13 +7,17 @@ public final class Constants {

public static final Set<String> DEFAULT_NAMESPACES =
Collections.singleton(Constants.WATCH_ALL_NAMESPACES);
public static final Set<String> WATCH_CURRENT_NAMESPACE_SET =
public static final Set<String> WATCH_CURRENT_NAMESPACES =
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not sure about this, in this simple plural form it says we can watch more current namespace. While the case is that this is only a helper to wrap the WATCH_CURRENT_NAMESPACE. That is why I just added the SET suffix.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Then let's rename all the Set constants with the _SET suffix

Copy link
Collaborator

Choose a reason for hiding this comment

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

agree!

Copy link
Collaborator

@csviri csviri left a comment

Choose a reason for hiding this comment

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

LGTM

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

48.3% 48.3% Coverage
0.0% 0.0% Duplication

@metacosm metacosm merged commit 51d4ec1 into main May 11, 2022
@metacosm metacosm deleted the clean-namespaces-constants branch May 11, 2022 11:34
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