You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Peter Turcsanyi (Jira)" <ji...@apache.org> on 2023/09/17 19:27:00 UTC

[jira] [Created] (NIFI-12075) Deprecate log methods with Object[] + Throwable parameters in ComponentLog

Peter Turcsanyi created NIFI-12075:
--------------------------------------

             Summary: Deprecate log methods with Object[] + Throwable parameters in ComponentLog
                 Key: NIFI-12075
                 URL: https://issues.apache.org/jira/browse/NIFI-12075
             Project: Apache NiFi
          Issue Type: Improvement
            Reporter: Peter Turcsanyi
            Assignee: Peter Turcsanyi


{{ComponentLog}} defines
{code:java}
void error(String msg, Object[] os, Throwable t)
{code}
and similar methods where the caller needs to create the {{Object}} array explicitly which results in boilerplate and less readable code.

The preferred way has been for a while to use the vararg signature instead:
{code:java}
void error(String msg, Object... os)
{code}
These methods can also handle the last {{Throwable}} argument properly.

The {{Object[]}} methods should be deprecated and the existing usages should be migrated to use the vararg methods. In 2.0 the deprecated methods can be removed.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)