aboutsummaryrefslogtreecommitdiffstats
path: root/common-logging
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@ericsson.com>2018-07-26 15:02:21 +0100
committerliamfallon <liam.fallon@ericsson.com>2018-07-26 15:02:37 +0100
commit525985191dac491bac972fb25e50426f51a2150e (patch)
treec76b0f82a8ccfa66cb93529dce7c41375a6138c4 /common-logging
parentb40acf2d244058c162a8597968e59f2708e6abf4 (diff)
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 <liam.fallon@ericsson.com>
Diffstat (limited to 'common-logging')
-rw-r--r--common-logging/src/test/java/org/onap/policy/common/logging/flexlogger/FlexLoggerTest.java4
-rw-r--r--common-logging/src/test/java/org/onap/policy/common/logging/flexlogger/Logger4JTest.java6
2 files changed, 5 insertions, 5 deletions
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());
}