Bug 48472 - OperandResolver parseDouble StringIndexOutOfBoundsException
Summary: OperandResolver parseDouble StringIndexOutOfBoundsException
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: 49723
Blocks:
  Show dependency tree
 
Reported: 2010-01-02 05:52 UTC by Kai Zimmermann
Modified: 2010-08-10 14:53 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kai Zimmermann 2010-01-02 05:52:02 UTC
When I use OperandResolver.parseDouble to parse a string like excel and I write 

OperandResolver.parseDouble("-");

 then occurs the following bug:

Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 0
	at java.lang.String.charAt(Unknown Source)
	at org.apache.poi.hssf.record.formula.eval.OperandResolver.parseDouble(OperandResolver.java:247)



PS: I know this will never use by anybody in this way, but if we calculate a formula with a reference to a minus, then occur exactly this, because the formulae use also OperandResolver.parseDouble
Comment 1 Brendan Nolan 2010-08-07 04:45:06 UTC
Fix for https://issues.apache.org/bugzilla/show_bug.cgi?id=49723 will resolve this defect
Comment 2 Yegor Kozlov 2010-08-10 14:53:18 UTC
Fixed in r984161 by the patch submitted in Bugzilla 48472

Yegor