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

   That test is already in the branch: `testClassValidatedBeforeInitialization` 
in `ConverterTests` walks exactly that path. It resolves the name through 
`Converter.CLASS`, runs `Plugin.class.isAssignableFrom(cls)`, and asserts 
`pluginInitializerRan` is still false at that point. Only after 
`cls.getConstructor().newInstance()` does it flip true. So the isAssignableFrom 
gate happens with nothing from the class executed; it fails on master and 
passes with the change.
   
   Also reworded the `CLASS` Javadoc per the co-pilot note so it doesn't 
overstate the guarantee ("resolving the name does not by itself trigger the 
static initializer" rather than a flat "does not run").


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