projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add a mandatory response message name to Command.Response.
[Sone.git]
/
src
/
main
/
java
/
net
/
pterodactylus
/
sone
/
fcp
/
GetPostsCommand.java
diff --git
a/src/main/java/net/pterodactylus/sone/fcp/GetPostsCommand.java
b/src/main/java/net/pterodactylus/sone/fcp/GetPostsCommand.java
index
0a02a89
..
24362d9
100644
(file)
--- a/
src/main/java/net/pterodactylus/sone/fcp/GetPostsCommand.java
+++ b/
src/main/java/net/pterodactylus/sone/fcp/GetPostsCommand.java
@@
-55,9
+55,9
@@
public class GetPostsCommand extends AbstractSoneCommand {
int maxPosts = getInt(parameters, "MaxPosts", -1);
List<Post> posts = sone.getPosts();
if (posts.size() < startPost) {
int maxPosts = getInt(parameters, "MaxPosts", -1);
List<Post> posts = sone.getPosts();
if (posts.size() < startPost) {
- return new Response(encodePosts(Collections.<Post> emptyList(), "Posts.", false));
+ return new Response(
"Posts",
encodePosts(Collections.<Post> emptyList(), "Posts.", false));
}
}
- return new Response(encodePosts(sone.getPosts().subList(startPost, (maxPosts == -1) ? posts.size() : Math.min(startPost + maxPosts, posts.size())), "Posts.", true));
+ return new Response(
"Posts",
encodePosts(sone.getPosts().subList(startPost, (maxPosts == -1) ? posts.size() : Math.min(startPost + maxPosts, posts.size())), "Posts.", true));
}
}
}
}