mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-11 02:50:15 +08:00
Optimize code
This commit is contained in:
parent
e8bb0f0bb4
commit
0acc99ed42
@ -32,7 +32,9 @@ import java.net.URLClassLoader
|
|||||||
|
|
||||||
internal object JarPluginLoaderImpl :
|
internal object JarPluginLoaderImpl :
|
||||||
AbstractFilePluginLoader<JvmPlugin, JvmPluginDescription>(".jar"),
|
AbstractFilePluginLoader<JvmPlugin, JvmPluginDescription>(".jar"),
|
||||||
CoroutineScope,
|
CoroutineScope by MiraiConsole.childScope("JarPluginLoader", CoroutineExceptionHandler { _, throwable ->
|
||||||
|
JarPluginLoaderImpl.logger.error("Unhandled Jar plugin exception: ${throwable.message}", throwable)
|
||||||
|
}),
|
||||||
JarPluginLoader {
|
JarPluginLoader {
|
||||||
|
|
||||||
override val configStorage: PluginDataStorage
|
override val configStorage: PluginDataStorage
|
||||||
@ -44,11 +46,6 @@ internal object JarPluginLoaderImpl :
|
|||||||
override val dataStorage: PluginDataStorage
|
override val dataStorage: PluginDataStorage
|
||||||
get() = MiraiConsoleImplementationBridge.dataStorageForJarPluginLoader
|
get() = MiraiConsoleImplementationBridge.dataStorageForJarPluginLoader
|
||||||
|
|
||||||
override val coroutineContext: CoroutineContext =
|
|
||||||
MiraiConsole.childScopeContext("JarPluginLoader", CoroutineExceptionHandler { _, throwable ->
|
|
||||||
logger.error("Unhandled Jar plugin exception: ${throwable.message}", throwable)
|
|
||||||
})
|
|
||||||
|
|
||||||
internal val classLoaders: MutableList<ClassLoader> = mutableListOf()
|
internal val classLoaders: MutableList<ClassLoader> = mutableListOf()
|
||||||
|
|
||||||
@Suppress("EXTENSION_SHADOWED_BY_MEMBER") // doesn't matter
|
@Suppress("EXTENSION_SHADOWED_BY_MEMBER") // doesn't matter
|
||||||
|
Loading…
Reference in New Issue
Block a user