You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2010/09/02 18:17:32 UTC
DO NOT REPLY [Bug 49864] New: documentation of getLastCellNum
changes is missing
https://issues.apache.org/bugzilla/show_bug.cgi?id=49864
Summary: documentation of getLastCellNum changes is missing
Product: POI
Version: 3.0
Platform: PC
Status: NEW
Severity: enhancement
Priority: P2
Component: HSSF
AssignedTo: dev@poi.apache.org
ReportedBy: rosenauer@gmx.net
Can you please add the following change to the changelog:
Somewhere between 2.5.1-FINAL and 3.0-FINAL in
org.apache.poi.hssf.usermodel.HSSFRow the method getLastCellNum changed from
"get the number of the last cell contained in this row."
to
"Gets the index of the last cell contained in this row PLUS ONE."
This is IMHO one of the most important changes between 2.5.1 and 3.x because it
breaks existing functionality (and it took me lots of time to find this
unmentioned change during upgrading as 3.2 produces only an NPE when accessing
nonexistent cells...)
Thank you very much!
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
DO NOT REPLY [Bug 49864] documentation of getLastCellNum changes is
missing
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49864
Florian R. <ro...@gmx.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |NEW
--- Comment #2 from Florian R. <ro...@gmx.net> 2010-09-08 10:58:06 EDT ---
if you compare the javadocs of getLastCellNum() of
http://archive.apache.org/dist/jakarta/poi/release/bin/poi-bin-2.5.1-final-20040804.zip
and
http://archive.apache.org/dist/jakarta/poi/release/bin/poi-bin-3.0-FINAL-20070503.zip
at this position:
poi-bin-2.5.1-final-20040804.zip/docs/apidocs/org/apache/poi/hssf/usermodel/HSSFRow.html
with
poi-bin-3.2-FINAL-20081019.zip/poi-3.2-FINAL/docs/apidocs/org/apache/poi/hssf/usermodel/HSSFRow.html
you can see there was a change.
Thanks for the iterator hint, I'll take a look at it.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
DO NOT REPLY [Bug 49864] documentation of getLastCellNum changes is
missing
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49864
Yegor Kozlov <ye...@dinom.ru> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |WONTFIX
--- Comment #3 from Yegor Kozlov <ye...@dinom.ru> 2011-06-24 09:57:43 UTC ---
The "plus one" change was made intentionally, the main goal was to make
lastCellNum the standard upper bound when iterating over cells:
int minColIx = row.getFirstCellNum();
int maxColIx = row.getLastCellNum();
for(int colIx = minColIx; colIx < maxColIx; colIx++) {
Cell cell = row.getCell(colIx);
//... do something with cell
}
It might had broke the code written for POI 2.5.1, but on the other hand it
prevented incorrect usages of lastCellNum in 'for' loops which seemed more
important at that time.
Yegor
(In reply to comment #2)
> if you compare the javadocs of getLastCellNum() of
> http://archive.apache.org/dist/jakarta/poi/release/bin/poi-bin-2.5.1-final-20040804.zip
> and
> http://archive.apache.org/dist/jakarta/poi/release/bin/poi-bin-3.0-FINAL-20070503.zip
>
> at this position:
>
> poi-bin-2.5.1-final-20040804.zip/docs/apidocs/org/apache/poi/hssf/usermodel/HSSFRow.html
> with
> poi-bin-3.2-FINAL-20081019.zip/poi-3.2-FINAL/docs/apidocs/org/apache/poi/hssf/usermodel/HSSFRow.html
>
> you can see there was a change.
>
>
> Thanks for the iterator hint, I'll take a look at it.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
DO NOT REPLY [Bug 49864] documentation of getLastCellNum changes is
missing
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49864
Nick Burch <ni...@alfresco.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO
OS/Version| |All
--- Comment #1 from Nick Burch <ni...@alfresco.com> 2010-09-06 11:25:25 EDT ---
It's so long since POI 2.5.x that I can't remember for sure... However I seem
to recall that there was a bug and some files returned the last cell index plus
one, and some the last index. This was fixed to always be plus one.
Someone else might be able to confirm or deny this though?
Otherwise, you may find the iterators (introduced in 3.5) much easier to work
with, see http://poi.apache.org/spreadsheet/quick-guide.html#Iterator
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org