From 954c09d0c31fa6f31d414c364f142742bf7cda91 Mon Sep 17 00:00:00 2001 From: Mark Bean Date: Wed, 22 Apr 2020 17:17:09 +0000 Subject: [PATCH] NIFI-7387: update ComponentLog API to accept Object varargs instead of array This closes #4225. Signed-off-by: Mark Payne --- .../java/org/apache/nifi/logging/ComponentLog.java | 12 ++++++------ .../apache/nifi/processors/evtx/ParseEvtxTest.java | 3 --- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/nifi-api/src/main/java/org/apache/nifi/logging/ComponentLog.java b/nifi-api/src/main/java/org/apache/nifi/logging/ComponentLog.java index fe9fb2d7bc..819cd6ac05 100644 --- a/nifi-api/src/main/java/org/apache/nifi/logging/ComponentLog.java +++ b/nifi-api/src/main/java/org/apache/nifi/logging/ComponentLog.java @@ -52,7 +52,7 @@ public interface ComponentLog { void warn(String msg, Throwable t); - void warn(String msg, Object[] os); + void warn(String msg, Object... os); void warn(String msg, Object[] os, Throwable t); @@ -60,7 +60,7 @@ public interface ComponentLog { void trace(String msg, Throwable t); - void trace(String msg, Object[] os); + void trace(String msg, Object... os); void trace(String msg); @@ -78,7 +78,7 @@ public interface ComponentLog { void info(String msg, Throwable t); - void info(String msg, Object[] os); + void info(String msg, Object... os); void info(String msg); @@ -88,7 +88,7 @@ public interface ComponentLog { void error(String msg, Throwable t); - void error(String msg, Object[] os); + void error(String msg, Object... os); void error(String msg); @@ -96,7 +96,7 @@ public interface ComponentLog { void debug(String msg, Throwable t); - void debug(String msg, Object[] os); + void debug(String msg, Object... os); void debug(String msg, Object[] os, Throwable t); @@ -104,7 +104,7 @@ public interface ComponentLog { void log(LogLevel level, String msg, Throwable t); - void log(LogLevel level, String msg, Object[] os); + void log(LogLevel level, String msg, Object... os); void log(LogLevel level, String msg); diff --git a/nifi-nar-bundles/nifi-evtx-bundle/nifi-evtx-processors/src/test/java/org/apache/nifi/processors/evtx/ParseEvtxTest.java b/nifi-nar-bundles/nifi-evtx-bundle/nifi-evtx-processors/src/test/java/org/apache/nifi/processors/evtx/ParseEvtxTest.java index 80c309bfc8..5bdd9def84 100644 --- a/nifi-nar-bundles/nifi-evtx-bundle/nifi-evtx-processors/src/test/java/org/apache/nifi/processors/evtx/ParseEvtxTest.java +++ b/nifi-nar-bundles/nifi-evtx-bundle/nifi-evtx-processors/src/test/java/org/apache/nifi/processors/evtx/ParseEvtxTest.java @@ -20,9 +20,7 @@ package org.apache.nifi.processors.evtx; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import static org.mockito.Mockito.any; -import static org.mockito.Mockito.anyString; import static org.mockito.Mockito.eq; -import static org.mockito.Mockito.isA; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.verifyNoMoreInteractions; @@ -144,7 +142,6 @@ public class ParseEvtxTest { when(flowFile.getAttribute(CoreAttributes.FILENAME.key())).thenReturn(basename); assertEquals(basename, parseEvtx.getBasename(flowFile, componentLog)); - verify(componentLog).warn(anyString(), isA(Object[].class)); } @Test