index title hash

This commit is contained in:
Athou
2013-07-26 08:15:23 +02:00
parent 6f29af1710
commit 9cdc364fde
6 changed files with 38 additions and 25 deletions

View File

@@ -90,7 +90,7 @@ public class FeedParser {
FeedEntryContent content = new FeedEntryContent();
content.setContent(getContent(item));
content.setTitle(getTitle(item));
content.setAuthor(item.getAuthor());
content.setAuthor(StringUtils.trimToNull(item.getAuthor()));
SyndEnclosure enclosure = (SyndEnclosure) Iterables.getFirst(item.getEnclosures(), null);
if (enclosure != null) {
content.setEnclosureUrl(FeedUtils.truncate(enclosure.getUrl(), 2048));
@@ -187,7 +187,7 @@ public class FeedParser {
} else {
content = StringUtils.join(Collections2.transform(item.getContents(), CONTENT_TO_STRING), SystemUtils.LINE_SEPARATOR);
}
return StringUtils.trimToEmpty(content);
return StringUtils.trimToNull(content);
}
private String getTitle(SyndEntry item) {
@@ -200,7 +200,7 @@ public class FeedParser {
title = "(no title)";
}
}
return title;
return StringUtils.trimToNull(title);
}
@SuppressWarnings("unchecked")