aboutsummaryrefslogtreecommitdiffstats
path: root/common-logging/src/main
diff options
context:
space:
mode:
authorPamela Dragosh <pdragosh@research.att.com>2020-01-14 13:51:12 -0500
committerPamela Dragosh <pdragosh@research.att.com>2020-01-14 14:09:41 -0500
commitc22d70d8f2429747ac7eb991c8d83aa3be633d1b (patch)
treed378efb029367b1cd692f96cfc2693397c359067 /common-logging/src/main
parentaaa77292ce7f5fa9909e1921a2881e83a520652a (diff)
Sonar cleanup overrides and fixes
Removal of UTF-8 because its already set capabilities doesn't generate any code, no need to include override false positives for passwords etc. override for logging and exception throw that we want add synchronized to overrides that are synchronized ignore checking of some conditions adding synchronized to match set* methods Issue-ID: POLICY-2321 Change-Id: I26d9ca22a0cdd67fdaae9c44b718b8dc103f190e Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Diffstat (limited to 'common-logging/src/main')
-rw-r--r--common-logging/src/main/java/org/onap/policy/common/logging/eelf/PolicyLogger.java20
1 files changed, 10 insertions, 10 deletions
diff --git a/common-logging/src/main/java/org/onap/policy/common/logging/eelf/PolicyLogger.java b/common-logging/src/main/java/org/onap/policy/common/logging/eelf/PolicyLogger.java
index cf0cfb3e..f1b25d71 100644
--- a/common-logging/src/main/java/org/onap/policy/common/logging/eelf/PolicyLogger.java
+++ b/common-logging/src/main/java/org/onap/policy/common/logging/eelf/PolicyLogger.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP-Logging
* ================================================================================
- * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -137,7 +137,7 @@ public class PolicyLogger {
}
- public static Level getDebugLevel() {
+ public static synchronized Level getDebugLevel() {
return debugLevel;
}
@@ -148,7 +148,7 @@ public class PolicyLogger {
/**
* Sets Debug Level.
*/
- public static void setDebugLevel(String newDebugLevel) {
+ public static synchronized void setDebugLevel(String newDebugLevel) {
if (isOverrideLogbackLevel) {
PolicyLogger.debugLevel = Level.valueOf(newDebugLevel);
@@ -157,7 +157,7 @@ public class PolicyLogger {
}
- public static Level getAuditLevel() {
+ public static synchronized Level getAuditLevel() {
return auditLevel;
}
@@ -168,7 +168,7 @@ public class PolicyLogger {
/**
* Sets Audit OFF or ON.
*/
- public static void setAuditLevel(String newAuditLevel) {
+ public static synchronized void setAuditLevel(String newAuditLevel) {
if (isOverrideLogbackLevel) {
if ("OFF".equalsIgnoreCase(newAuditLevel)) {
@@ -182,7 +182,7 @@ public class PolicyLogger {
}
}
- public static Level getMetricsLevel() {
+ public static synchronized Level getMetricsLevel() {
return metricsLevel;
}
@@ -193,7 +193,7 @@ public class PolicyLogger {
/**
* Sets Metrics OFF or ON.
*/
- public static void setMetricsLevel(String newMetricsLevel) {
+ public static synchronized void setMetricsLevel(String newMetricsLevel) {
if (isOverrideLogbackLevel) {
if ("OFF".equalsIgnoreCase(newMetricsLevel)) {
@@ -208,7 +208,7 @@ public class PolicyLogger {
}
- public static Level getErrorLevel() {
+ public static synchronized Level getErrorLevel() {
return errorLevel;
}
@@ -219,7 +219,7 @@ public class PolicyLogger {
/**
* Sets Error OFF or ON.
*/
- public static void setErrorLevel(String newErrorLevel) {
+ public static synchronized void setErrorLevel(String newErrorLevel) {
if (isOverrideLogbackLevel) {
if ("OFF".equalsIgnoreCase(newErrorLevel)) {
@@ -233,7 +233,7 @@ public class PolicyLogger {
}
}
- public static String getClassname() {
+ public static synchronized String getClassname() {
return classNameProp;
}