[ http://issues.apache.org/jira/browse/VELTOOLS-36?page=all ]
Tim Colson moved VELOCITY-313 to VELTOOLS-36: --------------------------------------------- Project: VelocityTools (was: Velocity) Key: VELTOOLS-36 (was: VELOCITY-313) Component: (was: Tools) Version: (was: 1.4) > AbstractSearchTool slip calculation is wrong. > --------------------------------------------- > > Key: VELTOOLS-36 > URL: http://issues.apache.org/jira/browse/VELTOOLS-36 > Project: VelocityTools > Type: Bug > Environment: Operating System: other > Platform: Other > Reporter: Shinobu Kawai > Attachments: AbstractSearchTool.slip.patch > > 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. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]