diff options
| author | Samuel Tardieu <sam@rfc1149.net> | 2013-09-14 12:45:36 +0200 |
|---|---|---|
| committer | Samuel Tardieu <sam@rfc1149.net> | 2013-09-14 13:21:47 +0200 |
| commit | e098903e6f1d64eda501ab5fe0158e72152e895c (patch) | |
| tree | 3c9965e053e49cb09c78a95f0cbb50fb952a8176 /main/src/cgeo/geocaching/StaticMapsProvider.java | |
| parent | c8ae73d874b3130d00ad844284a872f3901a6e88 (diff) | |
| download | cgeo-e098903e6f1d64eda501ab5fe0158e72152e895c.zip cgeo-e098903e6f1d64eda501ab5fe0158e72152e895c.tar.gz cgeo-e098903e6f1d64eda501ab5fe0158e72152e895c.tar.bz2 | |
refactoring: add annotations and remove useless check
Diffstat (limited to 'main/src/cgeo/geocaching/StaticMapsProvider.java')
| -rw-r--r-- | main/src/cgeo/geocaching/StaticMapsProvider.java | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/main/src/cgeo/geocaching/StaticMapsProvider.java b/main/src/cgeo/geocaching/StaticMapsProvider.java index cf279c0..d5cbb13 100644 --- a/main/src/cgeo/geocaching/StaticMapsProvider.java +++ b/main/src/cgeo/geocaching/StaticMapsProvider.java @@ -11,8 +11,8 @@ import cgeo.geocaching.utils.FileUtils; import cgeo.geocaching.utils.Log; import ch.boye.httpclientandroidlib.HttpResponse; - import org.apache.commons.lang3.StringUtils; +import org.eclipse.jdt.annotation.NonNull; import android.graphics.Bitmap; import android.graphics.BitmapFactory; @@ -245,11 +245,8 @@ public final class StaticMapsProvider { * @param cache * @return <code>true</code> if at least one map file exists; <code>false</code> otherwise */ - public static boolean hasStaticMap(final Geocache cache) { - if (cache == null) { - return false; - } - final String geocode = cache.getGeocode(); + public static boolean hasStaticMap(@NonNull final Geocache cache) { + final String geocode = cache.getGeocode(); if (StringUtils.isBlank(geocode)) { return false; } |
