diff options
3 files changed, 6 insertions, 37 deletions
diff --git a/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/parameters/RestServerParameters.java b/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/parameters/RestServerParameters.java index 671a1541..8e3561bd 100644 --- a/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/parameters/RestServerParameters.java +++ b/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/parameters/RestServerParameters.java @@ -46,7 +46,7 @@ public class RestServerParameters extends ParameterGroupImpl { private String password; private boolean https; private boolean aaf; - private boolean prometheus = true; + private boolean prometheus; private String servletClass; private String servletUriPath; diff --git a/utils/src/main/java/org/onap/policy/common/utils/logging/LoggerUtils.java b/utils/src/main/java/org/onap/policy/common/utils/logging/LoggerUtils.java index 9276f749..89575eb2 100644 --- a/utils/src/main/java/org/onap/policy/common/utils/logging/LoggerUtils.java +++ b/utils/src/main/java/org/onap/policy/common/utils/logging/LoggerUtils.java @@ -23,13 +23,15 @@ package org.onap.policy.common.utils.logging; import ch.qos.logback.classic.LoggerContext; +import lombok.AccessLevel; +import lombok.NoArgsConstructor; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.slf4j.Marker; import org.slf4j.MarkerFactory; - -public class LoggerUtils { +@NoArgsConstructor(access = AccessLevel.PRIVATE) +public final class LoggerUtils { private static final Logger LOGGER = LoggerFactory.getLogger(LoggerUtils.class); @@ -70,17 +72,6 @@ public class LoggerUtils { */ public static final Marker TRANSACTION_LOG_MARKER = MarkerFactory.getMarker(TRANSACTION_LOG_MARKER_NAME); - /** - * Logger delegate. - */ - private final Logger mlogger; - - /** - * Constructor. - */ - public LoggerUtils(final Logger loggerP) { - this.mlogger = checkNotNull(loggerP); - } /** * Set the log level of a logger. @@ -111,18 +102,4 @@ public class LoggerUtils { return logger.getLevel().toString(); } - - /** - * Dependency-free nullcheck. - * - * @param in to be checked - * @param <T> argument (and return) type - * @return input arg - */ - private static <T> T checkNotNull(final T in) { - if (in == null) { - throw new NullPointerException(); - } - return in; - } } diff --git a/utils/src/test/java/org/onap/policy/common/utils/logging/LoggerUtilsTest.java b/utils/src/test/java/org/onap/policy/common/utils/logging/LoggerUtilsTest.java index 61b83b4c..79db2093 100644 --- a/utils/src/test/java/org/onap/policy/common/utils/logging/LoggerUtilsTest.java +++ b/utils/src/test/java/org/onap/policy/common/utils/logging/LoggerUtilsTest.java @@ -24,10 +24,9 @@ package org.onap.policy.common.utils.logging; import static org.junit.Assert.assertTrue; -import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; -import org.mockito.runners.MockitoJUnitRunner; +import org.mockito.junit.MockitoJUnitRunner; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -35,13 +34,6 @@ import org.slf4j.LoggerFactory; public class LoggerUtilsTest { protected static final Logger logger = LoggerFactory.getLogger(LoggerUtilsTest.class); - private LoggerUtils util; - - @Before - public void setup() { - this.util = new LoggerUtils(logger); - } - @Test public void testMarker() { assertTrue(logger.isInfoEnabled()); |