summaryrefslogtreecommitdiffstats
path: root/utils/src/main/java
diff options
context:
space:
mode:
authorRam Krishna Verma <ram_krishna.verma@bell.ca>2021-08-23 16:22:02 +0000
committerGerrit Code Review <gerrit@onap.org>2021-08-23 16:22:02 +0000
commitc60efde8a54d11fa17cfc83c185f3ca3f4c64709 (patch)
tree7a293572767333ca1081a81cba277e3842cc12b2 /utils/src/main/java
parentccde636903b4d90d8df74335a67faa0859b81004 (diff)
parent376cb3fd21b7881cad8df1caa5f38be2c140b0da (diff)
Merge "Fix sonars and java warnings in common"
Diffstat (limited to 'utils/src/main/java')
-rw-r--r--utils/src/main/java/org/onap/policy/common/utils/logging/LoggerUtils.java31
1 files changed, 4 insertions, 27 deletions
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;
- }
}