rootvector2 commented on PR #441: URL: https://github.com/apache/commons-cli/pull/441#issuecomment-6416447871
Good catch, the clone keeps the preset value so `processValue` hits the arg limit. Restored the `isValuesEmpty()` check on the copy (`currentOption`) and added `DefaultParserTest.testPropertyDoesNotOverridePresetValue`. Without the guard it fails with `Cannot add value, list full.`, and with it the option keeps `preset`. The test lives in `DefaultParserTest` and not `AbstractParserTestCase` because the legacy `Parser` clears option values before each parse. -- 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]
