mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-10 18:40: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 :
|
||||
AbstractFilePluginLoader<JvmPlugin, JvmPluginDescription>(".jar"),
|
||||
CoroutineScope,
|
||||
CoroutineScope by MiraiConsole.childScope("JarPluginLoader", CoroutineExceptionHandler { _, throwable ->
|
||||
JarPluginLoaderImpl.logger.error("Unhandled Jar plugin exception: ${throwable.message}", throwable)
|
||||
}),
|
||||
JarPluginLoader {
|
||||
|
||||
override val configStorage: PluginDataStorage
|
||||
@ -44,11 +46,6 @@ internal object JarPluginLoaderImpl :
|
||||
override val dataStorage: PluginDataStorage
|
||||
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()
|
||||
|
||||
@Suppress("EXTENSION_SHADOWED_BY_MEMBER") // doesn't matter
|
||||
|
Loading…
Reference in New Issue
Block a user