-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(kubernetes): A few improvements to KubernetesKind (#3834)
* test(kubernetes): Add tests to KubernetesKind Add some tests to KubernetesKind before doing some refactoring of that class for performance reasons. * refactor(kubernetes): A few improvements to KubernetesKind In preparation for some more subtle changes, make a few improvements to the KubernetesKind class: * Make the public static fields also final * Make it more clear what is nullable and what isn't * Add equals and hash code methods that allow comparing to kinds via .equals() * refactor(kubernetes): Change from == to equals for KubernetesKind Most comparisons of KubernetesKind use == instead of equals(), which works because we currently keep a static pool of all KubernetesKinds and never create duplicates. The cost of keeping this static pool is much higher than the benefit, so move to using .equals() instead of == to prepare for a future where there can be two different KubernetesKind objects that are equal. * fix(kubernetes): Use case-insensitive comparison Kinds should be considered equal if their name is equal ignoring case. This matches the current logic where getOrRegisterKind will return a kind that matches ignoring case.
- Loading branch information
Showing
11 changed files
with
191 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.