farkhalit commented on PR #433:
URL: https://github.com/apache/commons-cli/pull/433#issuecomment-6005188994

   Fair point on the guide: it only describes define, parse, interrogate, and 
nothing in it promises parsing from several threads, so I've taken the 
concurrency angle out of the description. The case I'd stand on is narrower: 
parsing more than once with the same `Options`, and the library already treats 
that as supported. CLI-71 (`Parser.parse` clears option values "in case it's 
been used before"), CLI-156 ("required options are properly checked if an 
Options instance is used twice") and CLI-183 (groups reused for several 
parsings) were all fixed for exactly that, `testReuseOptionsTwice` covers it in 
the suite, `DefaultParser.parse` resets the group selection on every call, and 
`handleOption` clones for the same reason. The properties path is the one place 
left that still writes into the caller's `Options`, so with `DefaultParser` a 
second parse quietly returns the first parse's property value. That's the gap 
the new test pins down.
   
   Two updates on the branch: merged current master to clear the conflict, and 
took the suppressed Copilot note, so `handleProperties` now just sets the value 
on the copy `handleOption` already makes, the same idiom the argv paths use, 
with no extra clone. If you'd still rather keep `Options` single-use, I'm fine 
closing this.
   
   I also corrected the checklist in the description: the AI box should have 
been ticked. Claude was used to help find and prepare this change.
   


-- 
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