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 2011/06/24 11:57:43 UTC
DO NOT REPLY [Bug 49864] documentation of getLastCellNum changes is
missing
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