Address some deprecation warnings
(cherry picked from commit b79ef5dc79b12a3e47ea7c06bd16d2957422a8fd)
This commit is contained in:
parent
f1e6569cbe
commit
f81f995127
@ -36,7 +36,6 @@ import kotlinx.serialization.json.Json
|
||||
import net.zetetic.database.sqlcipher.SupportOpenHelperFactory
|
||||
import nl.adaptivity.xmlutil.XmlDeclMode
|
||||
import nl.adaptivity.xmlutil.core.XmlVersion
|
||||
import nl.adaptivity.xmlutil.serialization.UnknownChildHandler
|
||||
import nl.adaptivity.xmlutil.serialization.XML
|
||||
import tachiyomi.core.preference.AndroidPreferenceStore
|
||||
import tachiyomi.core.preference.PreferenceStore
|
||||
@ -150,10 +149,12 @@ class AppModule(val app: Application) : InjektModule {
|
||||
}
|
||||
addSingletonFactory {
|
||||
XML {
|
||||
unknownChildHandler = UnknownChildHandler { _, _, _, _, _ -> emptyList() }
|
||||
defaultPolicy {
|
||||
ignoreUnknownChildren()
|
||||
}
|
||||
autoPolymorphic = true
|
||||
xmlDeclMode = XmlDeclMode.Charset
|
||||
indent = 4
|
||||
indent = 2
|
||||
xmlVersion = XmlVersion.XML10
|
||||
}
|
||||
}
|
||||
|
@ -168,7 +168,7 @@ internal object ExtensionLoader {
|
||||
}
|
||||
.flatMap {
|
||||
try {
|
||||
when (val obj = Class.forName(it, false, classLoader).newInstance()) {
|
||||
when (val obj = Class.forName(it, false, classLoader).getDeclaredConstructor().newInstance()) {
|
||||
is Source -> listOf(obj)
|
||||
is SourceFactory -> obj.createSources()
|
||||
else -> throw Exception("Unknown source class type! ${obj.javaClass}")
|
||||
|
Loading…
x
Reference in New Issue
Block a user