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

   Added it in `testClassValidatedBeforeInitialization`. It resolves the class 
through `Converter.CLASS`, runs `Plugin.class.isAssignableFrom(cls)`, asserts 
the static initializer has not run at that point, then instantiates and asserts 
it has. Fails on master, passes with the change.
   
   On raboof's point, agreed it's a preference and not an obvious win. The 
eager-init advantages are real. My reasoning for lazy is narrow: resolving a 
name out of argv shouldn't run that class's code before the app has looked at 
it, and it puts the fail-fast decision back with the caller, who can still 
touch the class to force init if that's what they want. If you'd rather keep 
eager init, I'm fine closing this.


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