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

fix inconsistency in how PropertyDescriptors that use StandardValidators.BOOLEAN_VALIDATOR are built

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 0.3.0
    • None
    • Extensions

    Description

      There is some inconsistency in how Property descriptors are built when the validator is the BOOLEAN validator, notably with defaultValue and allowableValues

      Sometimes this (Upper Case First Character)

                      .defaultValue("True")
                      .allowableValues("True", "False")
                      .addValidator(StandardValidators.BOOLEAN_VALIDATOR)
      

      Sometimes this (all lower case)

                  .addValidator(StandardValidators.BOOLEAN_VALIDATOR)
                  .allowableValues("true", "false")
                  .defaultValue("true")
      

      And sometimes no allowableValues are used.

      Discovered when reviewing pull request for NIFI-944 and noticed the author of a pull request attempted to add allowableValues for consistency.

      Attachments

        Activity

          People

            Unassigned Unassigned
            tkurc Tony Kurc
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: