Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-6064

MockComponentLog misplaces reported exceptions

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.8.0, 1.9.0
    • Fix Version/s: 1.12.0, 1.11.3
    • Component/s: None
    • Labels:
      None

      Description

      When MockComponentLog.error(String, Throwable) is called, the message is forwarded to CapturingLogger.error(String, Object, Object), which treats the Throwable passed as the last parameter as a regular message parameter and passes it as such to the LogMessage constructor. As the result, the Throwable ends up as the last element in LogMessage.args, instead of the LogMessage.throwable field, where it would be more appropriate.

      Note: I have only tested this with 1.8.0, but the relevant code in the master branch is the same, so I assume the issue applies to the latest version as well.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Karthikkadajji karthik kadajji
                Reporter:
                sfzhi Sergei Zhirikov
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h