From 84515e7004fa2cbfc95b040e533ca58544256ed6 Mon Sep 17 00:00:00 2001 From: Christian Koop Date: Sun, 26 Jun 2022 13:57:12 +0200 Subject: [PATCH] Minor code cleanup in SongodaYamlConfig constructor keeps the logger effectively final + makes Codacity' static code analysis happy --- .../core/configuration/songoda/SongodaYamlConfig.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Core/src/main/java/com/songoda/core/configuration/songoda/SongodaYamlConfig.java b/Core/src/main/java/com/songoda/core/configuration/songoda/SongodaYamlConfig.java index d5221793..aa63ea2e 100644 --- a/Core/src/main/java/com/songoda/core/configuration/songoda/SongodaYamlConfig.java +++ b/Core/src/main/java/com/songoda/core/configuration/songoda/SongodaYamlConfig.java @@ -52,11 +52,7 @@ public class SongodaYamlConfig extends YamlConfiguration { super(); this.file = Objects.requireNonNull(file); - - if (logger == null) { - logger = Logger.getLogger(getClass().getName()); - } - this.logger = logger; + this.logger = logger != null ? logger : Logger.getLogger(getClass().getName()); } /**