This commit is contained in:
bskjon 2024-07-13 21:18:25 +02:00
parent b1e250c7a7
commit 1f0be50126
2 changed files with 4 additions and 3 deletions

View File

@ -104,7 +104,7 @@ jobs:
id: build-processer id: build-processer
run: | run: |
chmod +x ./gradlew chmod +x ./gradlew
./gradlew :apps:processer:bootJar --info ./gradlew :apps:processer:bootJar --info --stacktrace
echo "Build completed" echo "Build completed"
@ -161,7 +161,7 @@ jobs:
id: build-converter id: build-converter
run: | run: |
chmod +x ./gradlew chmod +x ./gradlew
./gradlew :apps:converter:bootJar --info ./gradlew :apps:converter:bootJar --info --debug
echo "Build completed" echo "Build completed"

View File

@ -74,6 +74,7 @@ abstract class EventCoordinator<T : EventImpl, E : EventsManagerImpl<T>> {
} }
private var cachedListeners: List<String> = emptyList() private var cachedListeners: List<String> = emptyList()
@SuppressWarnings("unchecked cast")
fun getListeners(): List<EventListenerImpl<T, *>> { fun getListeners(): List<EventListenerImpl<T, *>> {
val serviceBeans: Map<String, Any> = applicationContext.getBeansWithAnnotation(Service::class.java) val serviceBeans: Map<String, Any> = applicationContext.getBeansWithAnnotation(Service::class.java)
@ -81,7 +82,7 @@ abstract class EventCoordinator<T : EventImpl, E : EventsManagerImpl<T>> {
.filter { bean: Any? -> bean is EventListenerImpl<*, *> } .filter { bean: Any? -> bean is EventListenerImpl<*, *> }
.map { it -> it as EventListenerImpl<*, *> } .map { it -> it as EventListenerImpl<*, *> }
.toList() .toList()
val eventListeners = beans as List<EventListenerImpl<T, *>> val eventListeners: List<EventListenerImpl<T, *>> = beans as List<EventListenerImpl<T, *>>
val listenerNames = eventListeners.map { it::class.java.name } val listenerNames = eventListeners.map { it::class.java.name }
if (listenerNames != cachedListeners) { if (listenerNames != cachedListeners) {
listenerNames.filter { it !in cachedListeners }.forEach { listenerNames.filter { it !in cachedListeners }.forEach {