Custom default values: how to say "there is no default today"

Skip to first unread message

Jan 30, 2018, 10:06:13 AM1/30/18
to jcommander
I am just starting to use JCommander. What I am trying to do is this:
 - allow users to set persistent defaults in a file, but setting only the defaults they care about
 - load the file at runtime and use those defaults with an implementation of IDefaultProvider.

Now if my user does not fill in every default, what do I do? There does not seem to be a way to say: there is no default for this item.

I returned null, which promptly generated a NPE...

Am I missing something or is there no way to do it.


Reply all
Reply to author
0 new messages