diff --git a/src/de/danoeh/antennapod/feed/Feed.java b/src/de/danoeh/antennapod/feed/Feed.java index 42221fc31..0f7ebc63a 100644 --- a/src/de/danoeh/antennapod/feed/Feed.java +++ b/src/de/danoeh/antennapod/feed/Feed.java @@ -170,16 +170,7 @@ public class Feed extends FeedFile { } else { return download_url; } - } - - /** Calls cacheDescriptions on all items. */ - protected void cacheDescriptionsOfItems() { - if (items != null) { - for (FeedItem item : items) { - item.cacheDescriptions(); - } - } - } + } public void updateFromOther(Feed other) { super.updateFromOther(other); diff --git a/src/de/danoeh/antennapod/feed/FeedItem.java b/src/de/danoeh/antennapod/feed/FeedItem.java index 67ffcb1c6..54682397e 100644 --- a/src/de/danoeh/antennapod/feed/FeedItem.java +++ b/src/de/danoeh/antennapod/feed/FeedItem.java @@ -25,19 +25,14 @@ public class FeedItem extends FeedComponent implements private String itemIdentifier; private String title; /** - * The description of a feeditem. This field should only be set by the - * parser. + * The description of a feeditem. */ private String description; /** - * The content of the content-encoded tag of a feeditem. This field should - * only be set by the parser. + * The content of the content-encoded tag of a feeditem. */ private String contentEncoded; - private SoftReference cachedDescription; - private SoftReference cachedContentEncoded; - private String link; private Date pubDate; private FeedMedia media; @@ -87,21 +82,6 @@ public class FeedItem extends FeedComponent implements } } - /** - * Moves the 'description' and 'contentEncoded' field of feeditem to their - * SoftReference fields. - */ - protected void cacheDescriptions() { - if (description != null) { - cachedDescription = new SoftReference(description); - } - if (contentEncoded != null) { - cachedContentEncoded = new SoftReference(contentEncoded); - } - description = null; - contentEncoded = null; - } - /** * Returns the value that uniquely identifies this FeedItem. If the * itemIdentifier attribute is not null, it will be returned. Else it will @@ -127,9 +107,6 @@ public class FeedItem extends FeedComponent implements } public String getDescription() { - if (description == null && cachedDescription != null) { - return cachedDescription.get(); - } return description; } @@ -182,10 +159,6 @@ public class FeedItem extends FeedComponent implements } public String getContentEncoded() { - if (contentEncoded == null && cachedContentEncoded != null) { - return cachedContentEncoded.get(); - - } return contentEncoded; } @@ -228,14 +201,6 @@ public class FeedItem extends FeedComponent implements return false; } - public void setCachedDescription(String d) { - cachedDescription = new SoftReference(d); - } - - public void setCachedContentEncoded(String c) { - cachedContentEncoded = new SoftReference(c); - } - @Override public Callable loadShownotes() { return new Callable() {