You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by bu...@apache.org on 2004/11/08 10:37:33 UTC
DO NOT REPLY [Bug 32113] New: -
AbstractSearchTool slip calculation is wrong.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=32113>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=32113
AbstractSearchTool slip calculation is wrong.
Summary: AbstractSearchTool slip calculation is wrong.
Product: Velocity
Version: 1.4
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: Other
Component: Tools
AssignedTo: velocity-dev@jakarta.apache.org
ReportedBy: shinobu.kawai@gmail.com
AbstractSearchTool#getSlip() will only return (slipSize - 1) indeces. Also,
when the slipEnd is greater than the total pages, is returns a non-existing
page (totalPgs + 1).
1. int slipEnd = Math.min(totalPgs, (slipStart + adjSlipSize));
The totalPgs should be totalPgs - 1. (0-based)
2. for (int i=slipStart; i < slipEnd; i++)
Not including slipEnd. Should be i <= slipEnd.
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org