apply formatter

This commit is contained in:
Athou
2013-07-25 09:17:33 +02:00
parent 02f1090fe7
commit 8845c54d0c
82 changed files with 626 additions and 1116 deletions

View File

@@ -16,20 +16,14 @@ public class FeedEntryContentService {
/**
* this is NOT thread-safe
*/
public FeedEntryContent findOrCreate(FeedEntryContent content,
String baseUrl) {
public FeedEntryContent findOrCreate(FeedEntryContent content, String baseUrl) {
FeedEntryContent existing = feedEntryContentDAO.findExisting(content);
if (existing == null) {
content.setAuthor(FeedUtils.truncate(
FeedUtils.handleContent(content.getAuthor(), baseUrl, true),
128));
content.setTitle(FeedUtils.truncate(
FeedUtils.handleContent(content.getTitle(), baseUrl, true),
2048));
content.setAuthor(FeedUtils.truncate(FeedUtils.handleContent(content.getAuthor(), baseUrl, true), 128));
content.setTitle(FeedUtils.truncate(FeedUtils.handleContent(content.getTitle(), baseUrl, true), 2048));
content.setContentHash(DigestUtils.sha1Hex(content.getContent()));
content.setContent(FeedUtils.handleContent(content.getContent(),
baseUrl, false));
content.setContent(FeedUtils.handleContent(content.getContent(), baseUrl, false));
existing = content;
feedEntryContentDAO.saveOrUpdate(existing);
}