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

19 views
Skip to first unread message

dan.die...@gmail.com

unread,
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.

Thanks

Reply all
Reply to author
Forward
0 new messages