-
Notifications
You must be signed in to change notification settings - Fork 1k
clean-up #791
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
clean-up #791
Conversation
private final String namespace; | ||
|
||
private Map<String, String> labels = new HashMap<>(); | ||
private final Map<String, String> labels; |
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.
this is redundant, as the only way to set labels
is via the constructor.
|
||
public SecretsConfigProperties.NormalizedSource normalize(String defaultName, String defaultNamespace, | ||
Map<String, String> defaultLabels) { | ||
final String normalizedName = StringUtils.isEmpty(this.name) ? defaultName : this.name; |
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.
isEmpty
is deprecated, replace it with hasLength
. Also final
is not really needed
return new ArrayList<SecretsConfigProperties.NormalizedSource>() { | ||
{ | ||
add(new SecretsConfigProperties.NormalizedSource(SecretsConfigProperties.this.name, | ||
return Collections |
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.
double-brace initialization is a common anti-pattern, replace with a singletonList
|
||
@Override | ||
public String getConfigurationTarget() { | ||
return TARGET; |
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.
unless a String
is repeated in code for readability reasons, it is not needed as a constant in the form of private static final
No description provided.