From 5f96c538454a8a92de57fb8cf33fdafaa7d5f932 Mon Sep 17 00:00:00 2001 From: Username404-59 Date: Fri, 23 Apr 2021 15:50:47 +0200 Subject: [PATCH] Assign the result variable to a parsed file in the try-catch statement of Configuration.kt --- .../kotlin/fr/username404/snowygui/config/Configuration.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/src/main/kotlin/fr/username404/snowygui/config/Configuration.kt b/common/src/main/kotlin/fr/username404/snowygui/config/Configuration.kt index f532311..8ca505d 100644 --- a/common/src/main/kotlin/fr/username404/snowygui/config/Configuration.kt +++ b/common/src/main/kotlin/fr/username404/snowygui/config/Configuration.kt @@ -24,10 +24,10 @@ object Configuration { createNewFile() setWritable(true) setReadable(true) - } else result = try { - ConfigFactory.parseFile(file) + } else try { + result = ConfigFactory.parseFile(file) } catch (e: ConfigException) { - Snowy.logs.warn("Could not parse the snowy configuration file, the default configuration will be used instead."); result + Snowy.logs.warn("Could not parse the snowy configuration file, the default configuration will be used instead.") } } ConfigFactory.load(result).getConfig("Snowy").resolveWith(baseConf)