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

SyslogReader should not throw Exceptions on empty/blank lines

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.19.0
    • Extensions
    • None

    Description

      If the SyslogReader encounters an empty line, it throws an Exception:

      if (StringUtils.isBlank(line)) {
          // while an empty string is an error
          throw new MalformedRecordException("Encountered a blank message!");
      } 

      Often flows are built that use MergeContent or split data apart, etc. that can result in inadvertently including an empty line between messages. There's no need to throw an Exception in this case. Instead, we should simply skip over the empty line. Perhaps a debug log should be emitted but not an Exception.

      Attachments

        Issue Links

          Activity

            People

              markap14 Mark Payne
              markap14 Mark Payne
              Votes:
              1 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 - 20m
                  20m