Fix the result variable not being initialized, again.
This commit is contained in:
		
							parent
							
								
									13898d9de0
								
							
						
					
					
						commit
						1c3981a81a
					
				@ -18,7 +18,7 @@ object Configuration {
 | 
			
		||||
    private val baseConf = ConfigFactory.parseString(base)
 | 
			
		||||
    @JvmField
 | 
			
		||||
    val obtained: Config = run {
 | 
			
		||||
        lateinit var result: Config
 | 
			
		||||
        var result: Config = baseConf
 | 
			
		||||
        with(file) {
 | 
			
		||||
            if (!exists()) {
 | 
			
		||||
                createNewFile()
 | 
			
		||||
@ -27,7 +27,7 @@ object Configuration {
 | 
			
		||||
            } else result = try {
 | 
			
		||||
                ConfigFactory.parseFile(file)
 | 
			
		||||
            } catch (e: ConfigException) {
 | 
			
		||||
                Snowy.logs.warn("Could not parse the snowy configuration file, the default configuration will be used instead."); baseConf
 | 
			
		||||
                Snowy.logs.warn("Could not parse the snowy configuration file, the default configuration will be used instead."); result
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        ConfigFactory.load(result).getConfig("Snowy").resolveWith(baseConf)
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user