fix broken plugin warning
This commit is contained in:
parent
c78c8bae08
commit
688935df1c
|
@ -71,7 +71,7 @@ public abstract class Plugin {
|
|||
}
|
||||
|
||||
/**
|
||||
* Called before a new index is created on a node. The given module can be used to regsiter index-leve
|
||||
* Called before a new index is created on a node. The given module can be used to register index-level
|
||||
* extensions.
|
||||
*/
|
||||
public void onIndexModule(IndexModule indexModule) {}
|
||||
|
|
|
@ -184,6 +184,10 @@ public class PluginsService extends AbstractComponent {
|
|||
if (!method.getName().equals("onModule")) {
|
||||
continue;
|
||||
}
|
||||
// this is a deprecated final method, so all Plugin subclasses have it
|
||||
if (method.getParameterTypes().length == 1 && method.getParameterTypes()[0].equals(IndexModule.class)) {
|
||||
continue;
|
||||
}
|
||||
if (method.getParameterTypes().length == 0 || method.getParameterTypes().length > 1) {
|
||||
logger.warn("Plugin: {} implementing onModule with no parameters or more than one parameter", plugin.name());
|
||||
continue;
|
||||
|
|
Loading…
Reference in New Issue