dajiaohuang commented on PR #441:
URL: https://github.com/apache/commons-cli/pull/441#issuecomment-6392667153

   One regression to account for: this removes the existing 
`opt.isValuesEmpty()` guard and always calls 
`currentOption.processValue(value)`. `Option.getValuesList()` returns its 
mutable backing list, and `Options.addOption(Option)` stores the supplied 
instance, so a caller can register a one-argument option with an existing value 
(for example, add `preset` to `getValuesList()`) and then parse a property for 
that key. `handleOption` clones that full option; `currentOption.processValue` 
then throws `IllegalArgumentException` because the copy has already reached its 
argument limit. Before this change, the property value was skipped and the 
existing value was preserved. Could the empty-value condition be retained when 
applying the property to the clone, with a regression test for this case?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to