-
Notifications
You must be signed in to change notification settings - Fork 81
Disable testtool echo2 by default #8961
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
Disable testtool echo2 by default #8961
Conversation
if (attributes == null) | ||
return false; | ||
|
||
if (!attributes.containsKey("name") || !attributes.containsKey("value") || !attributes.containsKey("defaultValue")) |
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.
Will you always need to set defaultValue
on the annotation?
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.
+1
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.
You could also argument that if no value is found it resolves to false, and if you wish to check if its empty you must provide @ConditionalOnAppConstants(name="something", value="")
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.
Added a default to defaultValue in the annotation and remove the need for defaultValue to be set in the attributes map
c5e88a2
to
6785efd
Compare
if (attributes == null) | ||
return false; | ||
|
||
if (!attributes.containsKey("name") || !attributes.containsKey("value") || !attributes.containsKey("defaultValue")) |
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.
You could also argument that if no value is found it resolves to false, and if you wish to check if its empty you must provide @ConditionalOnAppConstants(name="something", value="")
Co-authored-by: Niels Meijer <nielsmeijer@hotmail.com>
This is not needed anymore because even if its not directly stated in the AppConstants, the context environment will have the value filled in if the property is set internally
|
No description provided.