Bug 33375 - [PATCH] Fix for HSSF Bug #33160
Summary: [PATCH] Fix for HSSF Bug #33160
Status: RESOLVED DUPLICATE of bug 33160
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: unspecified
Hardware: All All
: P2 critical (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Reported: 2005-02-02 23:08 UTC by Amol Deshmukh
Modified: 2005-04-21 07:02 UTC (History)
0 users

[PATCH] Patch file for bug 33160 (1.11 KB, patch)
2005-02-02 23:09 UTC, Amol Deshmukh
Details | Diff
Patch updated with test case (3.01 KB, patch)
2005-04-21 14:56 UTC, Amol Deshmukh
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Amol Deshmukh 2005-02-02 23:08:10 UTC
Setting value of cell to formulas containing numbers greater than
Short.MAX_VALUE (Java) caused an exception. 

This was due to a bug in the FormulaParser class. The code had a TODO comment
saying something to the effect that numbers greater than Short.MAX_VALUE would
cause a problem. The patch modifies the code so that a check is made to see if
the number is larger than Short.MAX_VALUE and accordingly either IntPtg or
NumberPtg is used in FormulaParser.

The patch also includes an additional test case (method added to class
TestFormulaParser that checks the behaviour of HSSF for large values in cell
Comment 1 Amol Deshmukh 2005-02-02 23:09:14 UTC
Created attachment 14163 [details]
[PATCH] Patch file for bug 33160

Patch for 33160. See previous comment for details.
Comment 2 Avik Sengupta 2005-04-21 14:20:23 UTC
This patch seems to be the same as the one attached to bug 33160. Amol, is this
what you intened? Pls Clarify!
Comment 3 Amol Deshmukh 2005-04-21 14:26:36 UTC
(In reply to comment #2)
> This patch seems to be the same as the one attached to bug 33160. Amol, is this
> what you intened? Pls Clarify!

Apologize for the confusion. I attached the patch to the bug 33160 prior to
attaching here, but later I came across some patch submission FAQ that said
patches should be filed and submitted as a separate entry in bugzilla. Hence the
duplication of this patch. The patch is IDENTICAL to the one submitted for 33160.
Comment 4 Avik Sengupta 2005-04-21 14:31:40 UTC
I am sorry if the documentation confused you... If a bug is already open, the
patch is best attached to the same bug. But no probs. 

Btw, I dont see a test method in the patch? The patch only contains a diff for
Comment 5 Amol Deshmukh 2005-04-21 14:56:18 UTC
Created attachment 14773 [details]
Patch updated with test case

This patch code is similar to the earlier, with one update but it also has the
test case.
Comment 6 Avik Sengupta 2005-04-21 15:02:32 UTC
Thanks for the tests. applied. Slighly different fix checked in (using intptg
for small numbers and numberptg for larger numbers).

*** This bug has been marked as a duplicate of 33160 ***