From 64c44295d3fac83e879883aac37365598e5ce798 Mon Sep 17 00:00:00 2001 From: Karlatemp Date: Sat, 10 Oct 2020 11:59:22 +0800 Subject: [PATCH] Resolve conflicts --- .../console/internal/plugin/BuiltInJvmPluginLoaderImpl.kt | 3 +-- .../mirai/console/internal/plugin/JvmPluginClassLoader.kt | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/plugin/BuiltInJvmPluginLoaderImpl.kt b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/plugin/BuiltInJvmPluginLoaderImpl.kt index 6a97d2b15..526496d73 100644 --- a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/plugin/BuiltInJvmPluginLoaderImpl.kt +++ b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/plugin/BuiltInJvmPluginLoaderImpl.kt @@ -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(".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 { diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/plugin/JvmPluginClassLoader.kt b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/plugin/JvmPluginClassLoader.kt index 0e68e3951..f0c37166d 100644 --- a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/plugin/JvmPluginClassLoader.kt +++ b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/plugin/JvmPluginClassLoader.kt @@ -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>()