Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Duplicate
-
None
-
None
-
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
- duplicates
-
NIFI-3989 DataTypeUtils handles isLongTypeCompatible, isDoubleTypeCompatible, etc. poorly
- Resolved