From f7bc34dbd488cc9570114a3f7ff8ad438303bc03 Mon Sep 17 00:00:00 2001 From: Username404 Date: Wed, 27 Oct 2021 10:24:06 +0200 Subject: [PATCH] Make Snowy.MissingComponent an object instead of a value containing an object --- common/src/main/kotlin/fr/username404/snowygui/Snowy.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/src/main/kotlin/fr/username404/snowygui/Snowy.kt b/common/src/main/kotlin/fr/username404/snowygui/Snowy.kt index bdf8a4d..a530330 100644 --- a/common/src/main/kotlin/fr/username404/snowygui/Snowy.kt +++ b/common/src/main/kotlin/fr/username404/snowygui/Snowy.kt @@ -14,7 +14,8 @@ abstract class Snowy { !Modifier.isAbstract(modifiers) && declaredAnnotations.any { it is ButtonInfo && !it.ignored } private val displayInitMessage: Boolean by Configuration companion object { - val MissingComponent: TranslatableComponent = object: TranslatableComponent(null) { override fun getString(): String = "MISSING_COMPONENT" } + @Suppress("NULLABILITY_MISMATCH_BASED_ON_JAVA_ANNOTATIONS") + object MissingComponent: TranslatableComponent(null) { override fun getString(): String = "MISSING_COMPONENT" } @Suppress("JVM_STATIC_ON_CONST_OR_JVM_FIELD") // See KT-39868 @JvmStatic protected const val FeaturePackage: String = "fr.username404.snowygui.gui.feature"