cloudfoundry/uaa — pull request #19 by youngm (2013-03-05 17:27:12+00:00)
Title: Making JdbcPagingList.sublist() compatible with java.util.List specification.

I'm creating an alternative implementation of ScimUserProvisioning. In this implementation instead of returning Lists of type JdbcPagingList I return instances of ArrayList instances. This then fails in several ScimUserEndpoint because JdbcPagingList.subList() doesn't conform to java.util.List.

List.subList() is supposed to throw an IndexOutOfBoundsException if the "toIndex" is greater than the size of the List. JdbcPagingList does not do this (by design it appears).

This patch brings JdbcPagingList.subList() into conformance with List.subList() and changes all of the uses of List.subList() in the application to match how List.subList() should be used.