Fixes the static modifier check
This commit is contained in:
parent
00ce1750c5
commit
0146cb6473
1 changed files with 2 additions and 2 deletions
|
@ -40,12 +40,12 @@ public class Bus {
|
|||
|
||||
List<Method> nonStaticMethods = Arrays.stream(clazz.getMethods())
|
||||
.filter(x -> x.isAnnotationPresent(Subscribe.class))
|
||||
.filter(x -> x.getModifiers() != Modifier.STATIC)
|
||||
.filter(x -> (x.getModifiers() & Modifier.STATIC) != Modifier.STATIC)
|
||||
.toList();
|
||||
|
||||
List<Method> staticMethods = Arrays.stream(clazz.getMethods())
|
||||
.filter(x -> x.isAnnotationPresent(Subscribe.class))
|
||||
.filter(x -> x.getModifiers() == Modifier.STATIC)
|
||||
.filter(x -> (x.getModifiers() & Modifier.STATIC) == Modifier.STATIC)
|
||||
.toList();
|
||||
|
||||
// Register the non-static methods if applicable
|
||||
|
|
Loading…
Reference in a new issue