Skip to content

Commit

Permalink
reverse the order of the feed, so newest entries are on top.
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeer committed Mar 12, 2013
1 parent 9e7976c commit 173bd68
Showing 1 changed file with 1 addition and 2 deletions.
Expand Up @@ -54,11 +54,10 @@ public class RSSPublisher extends AbstractResource {
private SyndFeed feed = new SyndFeedImpl();

@GET
@Path("")
@Produces("application/rss+xml")
public StreamSource getFeed() throws FeedException {
feed.setLink(uriInfo.getBaseUri().toString());
feed.setEntries(transform(copyOf(feedQueue), event2entry));
feed.setEntries(transform(copyOf(feedQueue).reverse(), event2entry));
// TODO ought to make this stream, not go through a string
return new StreamSource(new ByteArrayInputStream(new SyndFeedOutput()
.outputString(feed).getBytes()));
Expand Down

0 comments on commit 173bd68

Please sign in to comment.