From 525985191dac491bac972fb25e50426f51a2150e Mon Sep 17 00:00:00 2001 From: liamfallon Date: Thu, 26 Jul 2018 15:02:21 +0100 Subject: Fix eclipse warnings in common logging Minor annoying eclipse warnings due to raw Class and deprecated log enums removed. Change-Id: I7248b0c6fa4a4dc62104c75b07fadc5a144e8a47 Issue-ID: POLICY-716 Signed-off-by: liamfallon --- .../org/onap/policy/common/logging/flexlogger/FlexLoggerTest.java | 4 ++-- .../org/onap/policy/common/logging/flexlogger/Logger4JTest.java | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'common-logging') diff --git a/common-logging/src/test/java/org/onap/policy/common/logging/flexlogger/FlexLoggerTest.java b/common-logging/src/test/java/org/onap/policy/common/logging/flexlogger/FlexLoggerTest.java index 57afc9f7..7d6088eb 100644 --- a/common-logging/src/test/java/org/onap/policy/common/logging/flexlogger/FlexLoggerTest.java +++ b/common-logging/src/test/java/org/onap/policy/common/logging/flexlogger/FlexLoggerTest.java @@ -36,8 +36,8 @@ public class FlexLoggerTest { @Test public void testGetLoggerClassOfQEelf() { overrideStaticField(FlexLogger.class, "loggerType", LoggerType.EELF); - Logger logger = FlexLogger.getLogger((Class) null); - assertSame(logger, FlexLogger.getLogger((Class) null)); + Logger logger = FlexLogger.getLogger((Class) null); + assertSame(logger, FlexLogger.getLogger((Class) null)); assertNotEquals(logger, FlexLogger.getLogger(String.class)); } diff --git a/common-logging/src/test/java/org/onap/policy/common/logging/flexlogger/Logger4JTest.java b/common-logging/src/test/java/org/onap/policy/common/logging/flexlogger/Logger4JTest.java index 852e7f1b..7f2964c2 100644 --- a/common-logging/src/test/java/org/onap/policy/common/logging/flexlogger/Logger4JTest.java +++ b/common-logging/src/test/java/org/onap/policy/common/logging/flexlogger/Logger4JTest.java @@ -28,8 +28,8 @@ import static org.junit.Assert.assertTrue; import java.util.UUID; +import org.apache.log4j.Level; import org.apache.log4j.Logger; -import org.apache.log4j.Priority; import org.junit.Test; import org.mockito.Mockito; import org.onap.policy.common.logging.eelf.MessageCodes; @@ -109,7 +109,7 @@ public class Logger4JTest { public void testIsErrorEnabled() { Logger logger = Mockito.mock(Logger.class); TestUtils.overrideField(Logger4J.class, logger4J, "log", logger); - Mockito.when(logger.isEnabledFor(Priority.ERROR)).thenReturn(true).thenReturn(false); + Mockito.when(logger.isEnabledFor(Level.ERROR)).thenReturn(true).thenReturn(false); assertTrue(logger4J.isErrorEnabled()); assertFalse(logger4J.isErrorEnabled()); } @@ -127,7 +127,7 @@ public class Logger4JTest { public void testIsWarnEnabled() { Logger logger = Mockito.mock(Logger.class); TestUtils.overrideField(Logger4J.class, logger4J, "log", logger); - Mockito.when(logger.isEnabledFor(Priority.WARN)).thenReturn(true).thenReturn(false); + Mockito.when(logger.isEnabledFor(Level.WARN)).thenReturn(true).thenReturn(false); assertTrue(logger4J.isWarnEnabled()); assertFalse(logger4J.isWarnEnabled()); } -- cgit 1.2.3-korg