mirror of
https://github.com/corda/corda.git
synced 2025-06-19 15:43:52 +00:00
Making use of latest FastClasspathScanner version and cleanup of CollectSignaturesFlow.kt
This commit is contained in:
@ -6,7 +6,6 @@ import com.google.common.util.concurrent.ListenableFuture
|
||||
import com.google.common.util.concurrent.MoreExecutors
|
||||
import com.google.common.util.concurrent.SettableFuture
|
||||
import io.github.lukehutch.fastclasspathscanner.FastClasspathScanner
|
||||
import io.github.lukehutch.fastclasspathscanner.scanner.ClassInfo
|
||||
import net.corda.core.*
|
||||
import net.corda.core.crypto.*
|
||||
import net.corda.core.flows.FlowInitiator
|
||||
@ -352,12 +351,8 @@ abstract class AbstractNode(open val configuration: NodeConfiguration,
|
||||
}
|
||||
}
|
||||
|
||||
val classpathURLsField = ClassInfo::class.java.getDeclaredField("classpathElementURLs").apply { isAccessible = true }
|
||||
|
||||
flowClasses.groupBy {
|
||||
val classInfo = scanResult.classNameToClassInfo[it.name]
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
(classpathURLsField.get(classInfo) as Set<URL>).first()
|
||||
scanResult.classNameToClassInfo[it.name]!!.classpathElementURLs.first()
|
||||
}.forEach { url, classes ->
|
||||
log.info("Found flows in plugin ${url.pluginName()}: ${classes.joinToString { it.name }}")
|
||||
}
|
||||
|
Reference in New Issue
Block a user