Repository navigation
Document PluginManager.getExtensions instantiation #293 - #681
Conversation
Describe when instances are created, which plugin states contribute, whether repeated calls reuse instances, and that unknown ids or types return an empty list. Fixes pf4j#293
|
Thanks, this closes a gap that has been open since 2019, and the behaviour you describe matches the code. I checked each claim against One thing to fix before this can go in: the changelog entry uses with the others, they are kept in descending order. |
|
Following up on my own review, I looked at what the claims say and not at where they sit, and I think part of this belongs one layer down.
Could you keep on the interface what any implementation has to honour: never null, an empty list for an unknown id or a type with no extensions, a null plugin id meaning the application classpath, and that instances come from the The rest, that instances are created on the call rather than at load or start, that only started plugins contribute, the two factories, and the logging, reads well on the If you would rather not come back to this, say so and we will do the move in a follow-up, the content is yours either way. Sorry for coming back with this after approving the substance. |
Keep the interface contract (never null, empty list, null plugin id, ExtensionFactory identity) and document started-plugin, factory, and logging behaviour on AbstractPluginManager. Add the pf4j#293 changelog link.
|
Moved the DefaultPluginManager / factory / logging bits onto the AbstractPluginManager overrides and left the interface at the contract you listed (never null, empty list, null plugin id, ExtensionFactory identity). Added the [#293] changelog link. |
|
Thanks for the contribution, and for the quick turnaround. This is what I meant, and the changelog link is in the right place. |
The getExtensions methods on PluginManager had almost no API docs.
I documented the current DefaultPluginManager / AbstractExtensionFinder behavior:
Fixes #293