[ 
https://issues.apache.org/jira/browse/IOTDB-2657?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17502051#comment-17502051
 ] 

LuMing commented on IOTDB-2657:
-------------------------------

updated ,and pr is opened.

> NumberFormatException occurs when type infer for value with whitespace
> ----------------------------------------------------------------------
>
>                 Key: IOTDB-2657
>                 URL: https://issues.apache.org/jira/browse/IOTDB-2657
>             Project: Apache IoTDB
>          Issue Type: Bug
>            Reporter: LuMing
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: image-2022-03-07-09-44-39-729.png, 
> image-2022-03-07-09-45-55-935.png
>
>
> The method _isNumber_ uses _Double.parseDouble(s)_ to infer whether the input 
> string value is a number. _Double.parseDouble(s)_ skips tail zero or tail 
> whitespace{_}.{_} For instance , string "77123  " and "   7112324" are valid 
> input values. But when it comes to method _isConvertFloatPrecisionLack(s) ,_ 
> a _NumberFormatException_ occurs as whitespace is not allow in method 
> _Long.parseLong(s)._
> 1. Add two values in _isNumberTest_ , passed.
> _!image-2022-03-07-09-44-39-729.png!_
> 2. _testInferType_ failed
> _!image-2022-03-07-09-45-55-935.png!_
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to