}
if (automaticallyMergeChunks) {
if (log.isDebugEnabled()) {
log.debug("Found " + items.size() + " items in total");
}
return new VersionOrDeleteMarkersChunk(
prefix, delimiter,
items.toArray(new BaseVersionOrDeleteMarker[items.size()]),
commonPrefixes.toArray(new String[commonPrefixes.size()]),
null, null);
} else {
return new VersionOrDeleteMarkersChunk(
prefix, delimiter,
items.toArray(new BaseVersionOrDeleteMarker[items.size()]),
commonPrefixes.toArray(new String[commonPrefixes.size()]),
nextKeyMarker, nextVersionIdMarker);
}