Mark Payne created NIFI-3989:
--------------------------------
Summary: DataTypeUtils handles isLongTypeCompatible,
isDoubleTypeCompatible, etc. poorly
Key: NIFI-3989
URL: https://issues.apache.org/jira/browse/NIFI-3989
Project: Apache NiFi
Issue Type: Bug
Components: Extensions
Reporter: Mark Payne
Assignee: Mark Payne
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.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)