[ 
https://issues.apache.org/jira/browse/NIFI-3989?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Joseph Witt updated NIFI-3989:
------------------------------
    Resolution: Fixed
        Status: Resolved  (was: Patch Available)

+1 merged to master

> 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)

Reply via email to