diff options
author | daniel oeh <daniel.oeh@gmail.com> | 2013-08-08 12:50:48 +0200 |
---|---|---|
committer | daniel oeh <daniel.oeh@gmail.com> | 2013-08-09 21:35:18 +0200 |
commit | ce9f87ff3eb4ffcaf3c8174b97baac967026e1fa (patch) | |
tree | 89dcd79b179598ca03113846e3ef3279a96aa04f /src | |
parent | 24fdbba98b29b1988d2240d1c015c0a25db10ecb (diff) | |
download | AntennaPod-ce9f87ff3eb4ffcaf3c8174b97baac967026e1fa.zip |
Removed cachedDescription and cachedContentEncoded
Diffstat (limited to 'src')
-rw-r--r-- | src/de/danoeh/antennapod/feed/Feed.java | 11 | ||||
-rw-r--r-- | src/de/danoeh/antennapod/feed/FeedItem.java | 39 |
2 files changed, 3 insertions, 47 deletions
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<String> cachedDescription; - private SoftReference<String> cachedContentEncoded; - private String link; private Date pubDate; private FeedMedia media; @@ -88,21 +83,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<String>(description); - } - if (contentEncoded != null) { - cachedContentEncoded = new SoftReference<String>(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 * try to return the title. If the title is not given, it will use the link @@ -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<String>(d); - } - - public void setCachedContentEncoded(String c) { - cachedContentEncoded = new SoftReference<String>(c); - } - @Override public Callable<String> loadShownotes() { return new Callable<String>() { |