aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/network
diff options
context:
space:
mode:
authorSamuel Tardieu <sam@rfc1149.net>2014-01-20 19:22:49 +0100
committerSamuel Tardieu <sam@rfc1149.net>2014-01-20 19:22:49 +0100
commitca1c1d31bbb8e34498bbb9e27675b18b8f6fc6d7 (patch)
tree024852ddec47a4071181f28eb0136d6878abfffb /main/src/cgeo/geocaching/network
parentcfa472650954977ffb05baaed5dfdb64d2a2800e (diff)
downloadcgeo-ca1c1d31bbb8e34498bbb9e27675b18b8f6fc6d7.zip
cgeo-ca1c1d31bbb8e34498bbb9e27675b18b8f6fc6d7.tar.gz
cgeo-ca1c1d31bbb8e34498bbb9e27675b18b8f6fc6d7.tar.bz2
Fix @Nullable/@NonNull annotations
Diffstat (limited to 'main/src/cgeo/geocaching/network')
-rw-r--r--main/src/cgeo/geocaching/network/HtmlImage.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/main/src/cgeo/geocaching/network/HtmlImage.java b/main/src/cgeo/geocaching/network/HtmlImage.java
index 7cff0d3..0019acc 100644
--- a/main/src/cgeo/geocaching/network/HtmlImage.java
+++ b/main/src/cgeo/geocaching/network/HtmlImage.java
@@ -17,6 +17,7 @@ import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.tuple.ImmutablePair;
import org.apache.commons.lang3.tuple.Pair;
+import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.jdt.annotation.Nullable;
import rx.Observable;
import rx.Observable.OnSubscribeFunc;
@@ -288,7 +289,7 @@ public class HtmlImage implements Html.ImageGetter {
* @param forceKeep keep the image if it is there, without checking its freshness
* @return <code>true</code> if the image was there and is fresh enough, <code>false</code> otherwise
*/
- @Nullable
+ @NonNull
private Pair<Bitmap, Boolean> loadImageFromStorage(final String url, final String pseudoGeocode, final boolean forceKeep) {
try {
final File file = LocalStorage.getStorageFile(pseudoGeocode, url, true, false);
@@ -338,7 +339,7 @@ public class HtmlImage implements Html.ImageGetter {
* could not be loaded, or if the first component is <code>true</code> and <code>onlySave</code> is also
* <code>true</code>)
*/
- @Nullable
+ @NonNull
private Pair<Bitmap, Boolean> loadCachedImage(final File file, final boolean forceKeep) {
if (file.exists()) {
final boolean freshEnough = listId >= StoredList.STANDARD_LIST_ID || file.lastModified() > (new Date().getTime() - (24 * 60 * 60 * 1000)) || forceKeep;