From f2b425d077b4256ccdf2accab4e4e08186415ff6 Mon Sep 17 00:00:00 2001 From: Francis Toth Date: Fri, 10 Jul 2020 07:48:56 -0400 Subject: Fix minor sonar issues Signed-off-by: Francis Toth Change-Id: Iea540bb663429d55ce90879f9d9a22888c583833 Issue-ID: AAI-2128 --- .../src/test/java/org/onap/aai/logging/LoggingContextTest.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'aai-els-onap-logging/src/test') diff --git a/aai-els-onap-logging/src/test/java/org/onap/aai/logging/LoggingContextTest.java b/aai-els-onap-logging/src/test/java/org/onap/aai/logging/LoggingContextTest.java index 245840bc..4fe60315 100644 --- a/aai-els-onap-logging/src/test/java/org/onap/aai/logging/LoggingContextTest.java +++ b/aai-els-onap-logging/src/test/java/org/onap/aai/logging/LoggingContextTest.java @@ -1,4 +1,4 @@ -/** +/* * ============LICENSE_START======================================================= * org.onap.aai * ================================================================================ @@ -39,7 +39,7 @@ public class LoggingContextTest { LoggingContext.elapsedTime(300, TimeUnit.MILLISECONDS); assertEquals(MDC.get(LoggingContext.LoggingField.ELAPSED_TIME.toString()), "300"); LoggingContext.init(); - assertTrue(MDC.get(LoggingContext.LoggingField.ELAPSED_TIME.toString()) == null); + assertNull(MDC.get(LoggingContext.LoggingField.ELAPSED_TIME.toString())); } @Test public void stopWatchTest() { @@ -60,7 +60,7 @@ public class LoggingContextTest { assertEquals(testServiceName, MDC.get(LoggingContext.LoggingField.SERVICE_NAME.toString())); LoggingContext.clear(); - assertTrue(MDC.get(LoggingContext.LoggingField.SERVICE_NAME.toString()) == null); + assertNull(MDC.get(LoggingContext.LoggingField.SERVICE_NAME.toString())); } @@ -71,7 +71,7 @@ public class LoggingContextTest { assertEquals(testServiceName, MDC.get(LoggingContext.LoggingField.SERVICE_NAME.toString())); LoggingContext.remove(LoggingContext.LoggingField.SERVICE_NAME.toString()); - assertTrue(MDC.get(LoggingContext.LoggingField.SERVICE_NAME.toString()) == null); + assertNull(MDC.get(LoggingContext.LoggingField.SERVICE_NAME.toString())); } -- cgit 1.2.3-korg