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

Improve handling of DataTypeUtils.isNumberTypeCompatible

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • None
    • None
    • Extensions
    • None

    Description

      The DataTypeUtils class has a method named isNumberTypeCompatible that takes as an argument a Consumer<String>. We should instead make this a Predicate<String> and make the logic that is passed to this method more efficient in determining whether or not a value matches. For instance, to determine if a value is an Integer, it's calling Integer.parseInt() instead of matching against a regular expression or iterating over the characters and testing via String.charAt(int) and Character.isDigit(char).

      Attachments

        Issue Links

          Activity

            People

              markap14 Mark Payne
              markap14 Mark Payne
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: