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

createListValidator returns valid for empty list with "," input

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.12.0
    • None
    • None

    Description

      from Slack:
      <wouter.devries@tesorion.nl>
      "I'm looking at the createListValidator, and to my surprise passing in a list of (essentially) two empty elements "," validates, while a totally empty string "" does not. Apparently due to some underlying behavior of String.split."

      The string "," does return a String[0] from split. This should fail validation as if here were no elements as null, "", " " do possibly.

      But that kind of goes against or doesn't consider the ignore empty entries.
      I think the difference is whether or not you consider "," to be a list of two empty elements or an empty list.

      The current implementation with String.spilt() will produce an empty list. Is that correct?

      Attachments

        Issue Links

          Activity

            People

              otto Otto Fowler
              otto Otto Fowler
              Votes:
              0 Vote for this issue
              Watchers:
              5 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 - 3h
                  3h