Bug 49723

Summary: OperandResolver#parseDouble returns null for String input with leading decimal place
Product: POI Reporter: Brendan Nolan <brendan.nolan>
Component: HSSFAssignee: POI Developers List <dev>
Severity: normal    
Priority: P2    
Version: 3.7-dev   
Target Milestone: ---   
Hardware: PC   
OS: All   
Bug Depends on:    
Bug Blocks: 48472    
Attachments: Patch : Contain Fix and Testcase for OperandResolver.parseDouble

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