Retarget java 8

This commit is contained in:
zontreck 2023-12-04 23:20:21 -07:00
parent eab6877c9e
commit 901c76a937
2 changed files with 3 additions and 3 deletions

View file

@ -18,7 +18,7 @@ group = "dev.zontreck"
archivesBaseName = "EventsBus"
java {
toolchain.languageVersion = JavaLanguageVersion.of(17)
toolchain.languageVersion = JavaLanguageVersion.of(8)
withSourcesJar()
withJavadocJar()
}

View file

@ -41,12 +41,12 @@ public class Bus {
List<Method> nonStaticMethods = Arrays.stream(clazz.getMethods())
.filter(x -> x.isAnnotationPresent(Subscribe.class))
.filter(x -> (x.getModifiers() & Modifier.STATIC) != Modifier.STATIC)
.toList();
.collect(Collectors.toList());
List<Method> staticMethods = Arrays.stream(clazz.getMethods())
.filter(x -> x.isAnnotationPresent(Subscribe.class))
.filter(x -> (x.getModifiers() & Modifier.STATIC) == Modifier.STATIC)
.toList();
.collect(Collectors.toList());
// Register the non-static methods if applicable
if (instance != null) {