aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWyvest <45589059+Wyvest@users.noreply.github.com>2022-07-27 19:33:27 +0900
committerGitHub <noreply@github.com>2022-07-27 19:33:27 +0900
commit4f6bb78ddc2e6a418a555189ee665f892c85dfb4 (patch)
tree639be9632c383f5ce7fd521683e42b6e8d1986d0
parent045ca00486e62c89a4da5f880f6f52016e4dd14a (diff)
downloadOneConfig-4f6bb78ddc2e6a418a555189ee665f892c85dfb4.tar.gz
OneConfig-4f6bb78ddc2e6a418a555189ee665f892c85dfb4.tar.bz2
OneConfig-4f6bb78ddc2e6a418a555189ee665f892c85dfb4.zip
Allow parameters not used by the template not null-safe (#74)
-rw-r--r--versions/src/main/kotlin/cc/polyfrost/oneconfig/utils/KotlinLanguageAdapter.kt6
1 files changed, 3 insertions, 3 deletions
diff --git a/versions/src/main/kotlin/cc/polyfrost/oneconfig/utils/KotlinLanguageAdapter.kt b/versions/src/main/kotlin/cc/polyfrost/oneconfig/utils/KotlinLanguageAdapter.kt
index f520f00..2e29303 100644
--- a/versions/src/main/kotlin/cc/polyfrost/oneconfig/utils/KotlinLanguageAdapter.kt
+++ b/versions/src/main/kotlin/cc/polyfrost/oneconfig/utils/KotlinLanguageAdapter.kt
@@ -19,10 +19,10 @@ class KotlinLanguageAdapter : ILanguageAdapter {
override fun supportsStatics(): Boolean = false
override fun getNewInstance(
- container: FMLModContainer, objectClass: Class<*>, classLoader: ClassLoader, factoryMarkedAnnotation: Method
+ container: FMLModContainer?, objectClass: Class<*>, classLoader: ClassLoader?, factoryMarkedAnnotation: Method?
): Any = objectClass.kotlin.objectInstance ?: objectClass.getDeclaredConstructor().newInstance()
- override fun setProxy(target: Field, proxyTarget: Class<*>, proxy: Any) {
+ override fun setProxy(target: Field, proxyTarget: Class<*>, proxy: Any?) {
target.set(proxyTarget.kotlin.objectInstance, proxy)
}
@@ -30,4 +30,4 @@ class KotlinLanguageAdapter : ILanguageAdapter {
}
}
-//#endif \ No newline at end of file
+//#endif