eventbus: remove method name requirement

This commit is contained in:
ThatGamerBlue
2021-02-08 10:47:43 +00:00
parent aadfb88aa6
commit 131deca54e

View File

@@ -138,7 +138,10 @@ public class EventBus
}
final String preferredName = "on" + parameterClazz.getSimpleName();
Preconditions.checkArgument(method.getName().equals(preferredName), "Subscribed method " + method + " should be named " + preferredName);
if (!method.getName().equals(preferredName))
{
log.warn("Subscribed method " + method + " should be named " + preferredName);
}
method.setAccessible(true);
SubscriberMethod lambda = null;