mirror of https://github.com/pf4j/pf4j.git
Browse Source
Given the following preconditions: - `PluginClassLoader` is configured to use `ClassLoadingStrategy` `PDA`, `DPA` or `DAP`. - There is a `PluginStateListener` that calls `event.getPlugin().getPlugin()`. - A plugin (`plugin-a`) with a missing dependency is loaded (`plugin-a`). - The `Plugin` class in `plugin-a` extends, implements or references a class in either `plugin-b` or in the main application. In that scenario, when `plugin-a` is unloaded by pf4j, and the `PluginStateListener` is run, the `event.getPlugin().getPlugin()` call will fail with a `NullPointerException`. This is caused by the class loading done when instantiating the `Plugin` class in `plugin-a`. Because not all classes needed are found in `plugin-a` itself, pf4j will continue by looking up classes in `plugin-a`'s dependencies. Because `plugin-b` is missing and has no associated `ClassLoader`.pull/570/head
Sebastian Lövdahl
9 months ago
1 changed files with 1 additions and 1 deletions
Loading…
Reference in new issue