question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Missing multiValued attribute in @Option

See original GitHub issue

After updating to the newest args4j version I do have compile errors because of the removed “multiValued” attribute. I found the commit message which told, that it was removed because it would make no sense to have multi-value settings.

What about this case (which is simlar to mine):

@Option(name = "-in", multiValued = true, required = true)
private List<File> inFiles;

where I do support multiple ouccrences of -in (e.g. FooMain -in fileA.txt -in fileB.txt -in fileC.txt). How can this be done with the new release of args4j?

Issue Analytics

  • State:open
  • Created 10 years ago
  • Comments:11

github_iconTop GitHub Comments

2reactions
dimo414commented, Apr 11, 2016

@thammegowda note that the Javadoc for StringArrayOptionHandler indicates this is expected behavior:

All of [these examples] result in a single string array that contains three tokens: banan, hruska, and jablko.

If you need proper quoting support it might be better to use the default behavior and use the flag repeatedly, i.e.:

-in "United States" -in "United Kingdom"
0reactions
ooxicommented, Jan 31, 2018

There are no exceptions thrown to tell that there are no operands. StringArrayOptionHandler.parseArguments will return 0

I would consider this the correct behaviour, since an empty list looks totally fine to me

Read more comments on GitHub >

github_iconTop Results From Across the Web

Multivalued Attribute - an overview | ScienceDirect Topics
A multivalued attribute of an entity is an attribute that can have more than one value associated with the key of the entity....
Read more >
How to convert a multi-valued attribute into a single ... - IBM
Navigate to the required attribute and click on the attribute name to edit attribute. On the General properties tab, uncheck (unselect the ...
Read more >
Not able to see multivalued lookup attribute in Portlet, built ...
Hi, One portlet built using an Object. My requirement is to add one attribute(which is of multivalued lookup) to be available on the...
Read more >
JSON multi-value - Stack Overflow
You could use a data attribute to store the options for each function in the the option elements of select3 , then when...
Read more >
Known issues for application provisioning in Azure Active ...
Extensions to your schema can sometimes be missing from the source attribute dropdown in the UI. Go into the advanced settings of your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found