File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
common/src/main/kotlin/com/lambda/config Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -43,9 +43,12 @@ abstract class Configuration : Jsonable {
4343
4444 unsafeListener<ClientEvent .Shutdown >(Int .MIN_VALUE ) { trySave() }
4545
46- configurations.add( this )
46+ register( )
4747 }
4848
49+ // Avoid context-leaking warning
50+ private fun register () = configurations.add(this )
51+
4952 override fun toJson () =
5053 JsonObject ().apply {
5154 configurables.forEach {
@@ -99,8 +102,7 @@ abstract class Configuration : Jsonable {
99102 this @Configuration.info(message)
100103 }
101104 .onFailure {
102- val message =
103- " Failed to load ${configName.capitalize()} config from backup, unrecoverable error"
105+ val message = " Failed to load ${configName.capitalize()} config from backup, unrecoverable error"
104106 LOG .error(message, it)
105107 this @Configuration.logError(message)
106108 }
You can’t perform that action at this time.
0 commit comments