- newReplies = Collections2.filter(newReplies, new Predicate<PostReply>() {
-
- @Override
- public boolean apply(PostReply reply) {
- return (reply.getPost() != null) && (reply.getPost().getSone() != null);
- }
- });
- JsonArray jsonReplies = new JsonArray();
+ newReplies = Collections2.filter(newReplies, PostReply.HAS_POST_FILTER);
+ ArrayNode jsonReplies = new ArrayNode(instance);