Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
Description
DataTypeUtils is used to coerce an object of one type into an object of another type for record-oriented data. However, the isLongTypeCompatible method is calling Long.parseLong and catch NumberFormatException to check if a String is a valid Long, instead of iterating over each character in the string and checking Character.isDigit. We can also use the regex defined by JavaDocs for Double.parseDouble to handle the case of checking if a String is Double-type capable.
Attachments
Issue Links
- is duplicated by
-
NIFI-3928 Improve handling of DataTypeUtils.isNumberTypeCompatible
- Resolved
- links to