Skip to content

Conversation

@jeremysolarz
Copy link
Contributor

When a Main parameter

@Parameter(description = "Parameters")
private List<String> parameters = new ArrayList<>();

is defined and the program is called with an empty string as a parameter
java -jar jcommander-program.jar param1 ""
with the current implementation the parameter is removed.

The PR changes this.
@cbeust I am not sure why the empty string test was there in the beginning.
If there was a reason please tell and I will amend this PR accordingly.

@cbeust
Copy link
Owner

cbeust commented Dec 28, 2016

One test failed, can you take a look?

…nto issue-306-empty-string-as-parameter

* 'master' of https://github.com/jeremysolarz/jcommander:
  Add changelog entry for cbeust#305
  Do not display default value for help parameter in usage
  Finalize test case for omitting of default value display in usage output

# Conflicts:
#	CHANGELOG.md
#	src/main/java/com/beust/jcommander/JCommander.java
@jeremysolarz
Copy link
Contributor Author

jeremysolarz commented Dec 28, 2016

Fixed the test according to my comment in #306. I commented on the failing test.

Is my understanding in my last comment there correct?
If so the test was correctly changed. Otherwise let's discuss.

Best,

JS

@cbeust cbeust merged commit 5eae55a into cbeust:master Dec 28, 2016
@cbeust
Copy link
Owner

cbeust commented Dec 28, 2016

Looks good, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants