diff options
author | Taka Cho <takamune.cho@att.com> | 2021-08-17 14:23:26 -0400 |
---|---|---|
committer | Taka Cho <takamune.cho@att.com> | 2021-08-20 17:16:49 -0400 |
commit | bf06e83f40cdbfcfc1428040bf8fa58a518cdea4 (patch) | |
tree | 6bf66e14c5e340f4faa8e08cf7404e40cc6e4096 /runtime | |
parent | 172f990bd92e1441eca6dd161458efddb674b2fc (diff) |
sonar fix for clamp
- bug: added InterruptedException for sleep
- vulns: two false positve
- removed some unused import
- changed to use var for local variable
Issue-ID: POLICY-3452
Change-Id: I8b4be1378a2aad8f68562b63f70853832673ce97
Signed-off-by: Taka Cho <takamune.cho@att.com>
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/src/main/java/org/onap/policy/clamp/clds/util/LoggingUtils.java | 1 | ||||
-rw-r--r-- | runtime/src/main/java/org/onap/policy/clamp/loop/Loop.java | 6 |
2 files changed, 3 insertions, 4 deletions
diff --git a/runtime/src/main/java/org/onap/policy/clamp/clds/util/LoggingUtils.java b/runtime/src/main/java/org/onap/policy/clamp/clds/util/LoggingUtils.java index 4145844a2..5d09c065a 100644 --- a/runtime/src/main/java/org/onap/policy/clamp/clds/util/LoggingUtils.java +++ b/runtime/src/main/java/org/onap/policy/clamp/clds/util/LoggingUtils.java @@ -185,7 +185,6 @@ public class LoggingUtils { * @param serviceName service name */ public void entering(HttpServletRequest request, String serviceName) { - // MDC.clear(); checkNotNull(request); // Extract MDC values from standard HTTP headers. final String requestId = diff --git a/runtime/src/main/java/org/onap/policy/clamp/loop/Loop.java b/runtime/src/main/java/org/onap/policy/clamp/loop/Loop.java index 99d8d1e69..b4c9d348c 100644 --- a/runtime/src/main/java/org/onap/policy/clamp/loop/Loop.java +++ b/runtime/src/main/java/org/onap/policy/clamp/loop/Loop.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP CLAMP * ================================================================================ - * Copyright (C) 2019 AT&T Intellectual Property. All rights + * Copyright (C) 2019, 2021 AT&T Intellectual Property. All rights * reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); @@ -358,8 +358,8 @@ public class Loop extends AuditEntity implements Serializable { @Override public int hashCode() { - final int prime = 31; - int result = 1; + final var prime = 31; + var result = 1; result = prime * result + ((name == null) ? 0 : name.hashCode()); return result; } |