spring-shell
spring-shell copied to clipboard
Allow empty input with double quotes.
Empty input with double quotes("") was not allowed because of filtering empty string in StandardParameterResolver.resolve(). Assuming ShellMethod test(String a, @ShellOption(defaultValue = "") String b) and input 'test "" B'. Expected parameter is (a="", b="B"). But result is (a="B", b=""). So I remove filtering in StandardParameterResolver.resolve().
And remove unnecessary code.
I tested few method and It seems fine. But I am worrying about side effects. Please check my modification.
Codecov Report
Merging #249 into master will decrease coverage by
0.03%. The diff coverage is0%.
@@ Coverage Diff @@
## master #249 +/- ##
============================================
- Coverage 48.91% 48.87% -0.04%
+ Complexity 252 250 -2
============================================
Files 53 53
Lines 1333 1332 -1
Branches 204 204
============================================
- Hits 652 651 -1
Misses 625 625
Partials 56 56
| Impacted Files | Coverage Δ | Complexity Δ | |
|---|---|---|---|
| ...work/shell/standard/StandardParameterResolver.java | 84.54% <0%> (-0.07%) |
64 <1> (-2) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 5ec5899...9fbff08. Read the comment docs.