Bug 49723 - OperandResolver#parseDouble returns null for String input with leading decimal place
Summary: OperandResolver#parseDouble returns null for String input with leading decima...
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 3.7-dev
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks: 48472
  Show dependency tree
 
Reported: 2010-08-07 04:17 UTC by Brendan Nolan
Modified: 2010-08-10 14:52 UTC (History)
0 users



Attachments
Patch : Contain Fix and Testcase for OperandResolver.parseDouble (5.87 KB, patch)
2010-08-07 04:40 UTC, Brendan Nolan
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brendan Nolan 2010-08-07 04:17:34 UTC
OperandResolver.parseDouble(".123") will return null
OperandResolver.parseDouble("-.123") will return null

Both operations should return a correct Double value
Comment 1 Brendan Nolan 2010-08-07 04:40:17 UTC
Created attachment 25859 [details]
Patch : Contain Fix and Testcase for OperandResolver.parseDouble

This patch also contain a testcase for Bug 48472 as it fixes this issue as well.
Comment 2 Yegor Kozlov 2010-08-10 14:52:24 UTC
A very nice patch! 

Regexp-based detection is much more elegant than the previous logic. Applied in r984161

Thanks,
Yegor