Project: duracloud
Issue DURACLOUD-229: Content does not complete if list size >= 1000
When the number of content items within a space exceeds 1000 and the "maxResults" parameter is set to 1000 or greater (1000 is the default), then ContentIterator.java eventually terminates early. This is because the underlying query to the storage provider is maxResults+1 to account for the possibility that the space metadata content object may be in the listing. Since the S3 client will only return a max of 1000 items regardless of the maxResults parameter, the call with 1001 effectively turns into a call for 1000 items. The logic in ContentIterator is terminating if the number of items in the listing returned is less than the maxResults parameter, which is the case when 1000 items are returned and one is removed (i.e. the space metadata object).
Story points: 1