Hardcoded support for boolean converter#17
Merged
angelozerr merged 1 commit intoeclipse-lsp4mp:masterfrom Aug 31, 2020
Merged
Conversation
Contributor
Author
0585c8b to
d535cfe
Compare
xorye
reviewed
Jul 21, 2020
|
|
||
| private static boolean isBooleanString(String str) { | ||
| return "true".equals(str) || "false".equals(str); | ||
| return "true".equals(str) || "false".equals(str) || "Y".equals(str) || "YES".equals(str) || "1".equals(str) || "ON".equals(str); |
There was a problem hiding this comment.
Can we have the check be case insensitive? If the value is oN, on, TrUE, yes etc., according to https://github.com/eclipse/microprofile-config/blob/master/spec/src/main/asciidoc/converters.asciidoc#built-in-converters we should still consider those to be true
Contributor
Author
There was a problem hiding this comment.
Thanks! Forgot to look into this.
|
Works well on my machine, with Quarkus |
d535cfe to
2b45101
Compare
xorye
approved these changes
Jul 23, 2020
rzgry
approved these changes
Jul 28, 2020
Contributor
|
@datho7561 please fix the conflict |
Boolean validator now supports 'Y', 'YES', '1', 'ON'. The error message for an invalid boolean value now displays a warning that the value will be automatically interpreted as 'false'. Closes eclipse-lsp4mp#298 Signed-off-by: David Thompson <davthomp@redhat.com>
2b45101 to
3b530ba
Compare
Contributor
Author
|
rebased |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Boolean validator now supports 'Y', 'YES', '1', 'ON'. The error message for an invalid boolean value now displays a warning that the value will be automatically interpreted as 'false'.
Closes redhat-developer/quarkus-ls#298
Signed-off-by: David Thompson davthomp@redhat.com