Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
Description
Before 1.11 to use a reporter its class was configured, and the instance instantiated via reflection.
We then introduced reporter factories, and added an annotation for redirection instantiation attempts from the reporter class to factories, by annotating the reporter class with InstantiateViaFactory.
However, when we migrated reporters to plugins, this approach stopped working, the reason being that it required the reporter class to be accessible. The plugin system only exposes the factories however.
To ensure that existing configurations continue to work, I propose to add a new InterceptInstantiationViaReflection annotation for factories, with which they can specify a class name to intercept reflection-based instantiation attempts.
Basically, we just invert the InstantiateViaFactory logic.
Instead of the reporter saying "This factory should be used to instantiate me.", the factory now say "I can instantiate that reporter."
Attachments
Issue Links
- links to