Skip to content
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

Fix default value for lists #31

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

BarkingBad
Copy link

@BarkingBad BarkingBad commented May 14, 2020

This condition is wrong, empty list should be permitted to be default value as all other concrete values can be. And in my case it is default value. What's more this condition didn't prevent other collections from having default value of empty collection e. g. Set, Map, Collection.

I am talking about SingleNullableOption, not MultipleOption, where it is clearly stated that it can't have emtpy collection, though I don't know why

@LepilkinaElena
Copy link

LepilkinaElena commented May 15, 2020

It's done by design. MultipleOption when it doesn't set by user stores empty list.
Why do you need setting default value as empty list if it's already empty list? If there is nothing provided for this option in command line you get empty list without any defaults.

I am talking about SingleNullableOption

SingleNullableOption stores null value if no value is provided in command line. Other types of collections isn't supported, only lists for several values.

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