mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-25 15:40:28 +08:00
Resolve conflicts
This commit is contained in:
parent
bf40b6036b
commit
64c44295d3
@ -24,7 +24,6 @@ import net.mamoe.mirai.console.util.CoroutineScopeUtils.childScope
|
|||||||
import net.mamoe.mirai.utils.MiraiLogger
|
import net.mamoe.mirai.utils.MiraiLogger
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import java.util.concurrent.ConcurrentHashMap
|
import java.util.concurrent.ConcurrentHashMap
|
||||||
import java.util.concurrent.ConcurrentLinkedQueue
|
|
||||||
|
|
||||||
internal object BuiltInJvmPluginLoaderImpl :
|
internal object BuiltInJvmPluginLoaderImpl :
|
||||||
AbstractFilePluginLoader<JvmPlugin, JvmPluginDescription>(".jar"),
|
AbstractFilePluginLoader<JvmPlugin, JvmPluginDescription>(".jar"),
|
||||||
@ -83,7 +82,7 @@ internal object BuiltInJvmPluginLoaderImpl :
|
|||||||
val filePlugins = this.filterNot {
|
val filePlugins = this.filterNot {
|
||||||
pluginFileToInstanceMap.containsKey(it)
|
pluginFileToInstanceMap.containsKey(it)
|
||||||
}.associateWith {
|
}.associateWith {
|
||||||
JvmPluginClassLoader(it, arrayOf(it.toURI().toURL()), MiraiConsole::class.java.classLoader, classLoaders)
|
JvmPluginClassLoader(it, MiraiConsole::class.java.classLoader, classLoaders)
|
||||||
}.onEach { (_, classLoader) ->
|
}.onEach { (_, classLoader) ->
|
||||||
classLoaders.add(classLoader)
|
classLoaders.add(classLoader)
|
||||||
}.asSequence().findAllInstances().onEach {
|
}.asSequence().findAllInstances().onEach {
|
||||||
|
@ -30,7 +30,7 @@ internal class JvmPluginClassLoader(
|
|||||||
// 因此无需 override getResourceAsStream
|
// 因此无需 override getResourceAsStream
|
||||||
|
|
||||||
override fun toString(): String {
|
override fun toString(): String {
|
||||||
return "JvmPluginClassLoader{source=$source}"
|
return "JvmPluginClassLoader{source=$file}"
|
||||||
}
|
}
|
||||||
|
|
||||||
private val cache = ConcurrentHashMap<String, Class<*>>()
|
private val cache = ConcurrentHashMap<String, Class<*>>()
|
||||||
|
Loading…
Reference in New Issue
Block a user