Resolve conflicts

This commit is contained in:
Karlatemp 2020-10-10 11:59:22 +08:00
parent bf40b6036b
commit 64c44295d3
No known key found for this signature in database
GPG Key ID: 21FBDDF664FF06F8
2 changed files with 2 additions and 3 deletions

View File

@ -24,7 +24,6 @@ import net.mamoe.mirai.console.util.CoroutineScopeUtils.childScope
import net.mamoe.mirai.utils.MiraiLogger
import java.io.File
import java.util.concurrent.ConcurrentHashMap
import java.util.concurrent.ConcurrentLinkedQueue
internal object BuiltInJvmPluginLoaderImpl :
AbstractFilePluginLoader<JvmPlugin, JvmPluginDescription>(".jar"),
@ -83,7 +82,7 @@ internal object BuiltInJvmPluginLoaderImpl :
val filePlugins = this.filterNot {
pluginFileToInstanceMap.containsKey(it)
}.associateWith {
JvmPluginClassLoader(it, arrayOf(it.toURI().toURL()), MiraiConsole::class.java.classLoader, classLoaders)
JvmPluginClassLoader(it, MiraiConsole::class.java.classLoader, classLoaders)
}.onEach { (_, classLoader) ->
classLoaders.add(classLoader)
}.asSequence().findAllInstances().onEach {

View File

@ -30,7 +30,7 @@ internal class JvmPluginClassLoader(
// 因此无需 override getResourceAsStream
override fun toString(): String {
return "JvmPluginClassLoader{source=$source}"
return "JvmPluginClassLoader{source=$file}"
}
private val cache = ConcurrentHashMap<String, Class<*>>()