mboudreau/Alternator — pull request #47 by rrutt (2012-10-27 20:59:16+00:00)
Title: Minor bug fix for .scan with limit higher than result set size.

If a limit is passed in a scan request, and the limit is larger than the number of items that meet the scan criteria, a bounds exception was thrown by the .subList method.

This fix checks the limit vs. the original items.size() to determine if .subList is required.

Two additional unit tests were added to exercise both "low" and "high" limits.
The "high" limit was the one that previously triggered an exception.