fix broken plugin warning

This commit is contained in:
Robert Muir 2015-12-04 02:38:56 -05:00
parent c78c8bae08
commit 688935df1c
2 changed files with 5 additions and 1 deletions

View File

@ -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) {}

View File

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