From c6ede757188c132f7be7bd8766ac7b7085c375c4 Mon Sep 17 00:00:00 2001 From: Scoppio Date: Sun, 1 Dec 2024 22:28:46 -0300 Subject: [PATCH] fix: one logger --- .../src/mekhq/campaign/force/StrategicFormation.java | 2 +- MekHQ/src/mekhq/utilities/MoreObjects.java | 12 ------------ 2 files changed, 1 insertion(+), 13 deletions(-) delete mode 100644 MekHQ/src/mekhq/utilities/MoreObjects.java diff --git a/MekHQ/src/mekhq/campaign/force/StrategicFormation.java b/MekHQ/src/mekhq/campaign/force/StrategicFormation.java index 833b3f5e05..a1ca8f78e4 100644 --- a/MekHQ/src/mekhq/campaign/force/StrategicFormation.java +++ b/MekHQ/src/mekhq/campaign/force/StrategicFormation.java @@ -611,7 +611,7 @@ public static double calculateTotalWeight(Campaign campaign, int forceId) { weight += entity.getWeight(); } } catch (Exception exception) { - logger.error(String.format("Failed to parse unit ID %s: %s", forceId, exception)); + logger.error("Failed to parse unit ID {}: {}", forceId, exception); } } diff --git a/MekHQ/src/mekhq/utilities/MoreObjects.java b/MekHQ/src/mekhq/utilities/MoreObjects.java deleted file mode 100644 index 088b361cad..0000000000 --- a/MekHQ/src/mekhq/utilities/MoreObjects.java +++ /dev/null @@ -1,12 +0,0 @@ -package mekhq.utilities; - -public class MoreObjects { - - private MoreObjects() { - } - - public static O firstNonNull(O first, O second) { - return first != null ? first : second; - } -} -