From 5557459f72d3c056f79f6a619ae4ae4298428776 Mon Sep 17 00:00:00 2001 From: Matt Pearce Date: Sun, 22 Mar 2020 09:21:54 +0000 Subject: [PATCH] #109: Instantiate MetricClassConfigurationManager immediately on start-up. --- .../metrics/MetricClassConfigurationManager.java | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/rre-core/src/main/java/io/sease/rre/core/domain/metrics/MetricClassConfigurationManager.java b/rre-core/src/main/java/io/sease/rre/core/domain/metrics/MetricClassConfigurationManager.java index ac518f4d..d4a4f270 100644 --- a/rre-core/src/main/java/io/sease/rre/core/domain/metrics/MetricClassConfigurationManager.java +++ b/rre-core/src/main/java/io/sease/rre/core/domain/metrics/MetricClassConfigurationManager.java @@ -12,20 +12,13 @@ */ public class MetricClassConfigurationManager { - private static MetricClassConfigurationManager instance; + private static MetricClassConfigurationManager INSTANCE = new MetricClassConfigurationManager(); private BigDecimal defaultMaximumGrade = BigDecimal.valueOf(3); private BigDecimal defaultMissingGrade = BigDecimal.valueOf(2); - private MetricClassConfigurationManager() { - // Private constructor - } - public static MetricClassConfigurationManager getInstance() { - if (instance == null) { - instance = new MetricClassConfigurationManager(); - } - return instance; + return INSTANCE; } /**