[
https://issues.apache.org/jira/browse/NIFI-3989?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16034748#comment-16034748
]
ASF GitHub Bot commented on NIFI-3989:
--------------------------------------
Github user asfgit closed the pull request at:
https://github.com/apache/nifi/pull/1869
> 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
> Fix For: 1.3.0
>
>
> 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)