int maxPosts = getInt(parameters, "MaxPosts", -1);
List<Post> posts = sone.getPosts();
if (posts.size() < startPost) {
- return new Response(encodePosts(Collections.<Post> emptyList(), false));
+ return new Response(encodePosts(Collections.<Post> emptyList(), "Posts.", false));
}
- return new Response(encodePosts(sone.getPosts().subList(startPost, (maxPosts == -1) ? posts.size() : Math.min(startPost + maxPosts, posts.size())), true));
+ return new Response(encodePosts(sone.getPosts().subList(startPost, (maxPosts == -1) ? posts.size() : Math.min(startPost + maxPosts, posts.size())), "Posts.", true));
}
}