diff options
author | Bananeweizen <bananeweizen@gmx.de> | 2015-01-27 20:46:01 +0100 |
---|---|---|
committer | Bananeweizen <bananeweizen@gmx.de> | 2015-01-27 20:46:01 +0100 |
commit | 6d0a2f562dae0a236b30b8e733410b44a4dcb7bd (patch) | |
tree | bb0fddc5bece5294c076f55cb7530905dc36913c /main/src/cgeo/geocaching/connector | |
parent | c9ec99080115f7d981e11f8573ae2cd874cd7b8b (diff) | |
download | cgeo-6d0a2f562dae0a236b30b8e733410b44a4dcb7bd.zip cgeo-6d0a2f562dae0a236b30b8e733410b44a4dcb7bd.tar.gz cgeo-6d0a2f562dae0a236b30b8e733410b44a4dcb7bd.tar.bz2 |
refactoring: use null URL in UnknownConnector
Diffstat (limited to 'main/src/cgeo/geocaching/connector')
-rw-r--r-- | main/src/cgeo/geocaching/connector/AbstractConnector.java | 3 | ||||
-rw-r--r-- | main/src/cgeo/geocaching/connector/IConnector.java | 5 | ||||
-rw-r--r-- | main/src/cgeo/geocaching/connector/UnknownConnector.java | 5 |
3 files changed, 8 insertions, 5 deletions
diff --git a/main/src/cgeo/geocaching/connector/AbstractConnector.java b/main/src/cgeo/geocaching/connector/AbstractConnector.java index 4984273..7e21366 100644 --- a/main/src/cgeo/geocaching/connector/AbstractConnector.java +++ b/main/src/cgeo/geocaching/connector/AbstractConnector.java @@ -19,6 +19,7 @@ import cgeo.geocaching.location.Geopoint; import org.apache.commons.lang3.StringUtils; import org.eclipse.jdt.annotation.NonNull; +import org.eclipse.jdt.annotation.Nullable; import rx.functions.Action1; @@ -144,7 +145,7 @@ public abstract class AbstractConnector implements IConnector { abstract protected String getCacheUrlPrefix(); @Override - @NonNull + @Nullable public String getLongCacheUrl(final @NonNull Geocache cache) { return getCacheUrl(cache); } diff --git a/main/src/cgeo/geocaching/connector/IConnector.java b/main/src/cgeo/geocaching/connector/IConnector.java index 0863723..ce98605 100644 --- a/main/src/cgeo/geocaching/connector/IConnector.java +++ b/main/src/cgeo/geocaching/connector/IConnector.java @@ -6,6 +6,7 @@ import cgeo.geocaching.enumerations.LogType; import cgeo.geocaching.location.Geopoint; import org.eclipse.jdt.annotation.NonNull; +import org.eclipse.jdt.annotation.Nullable; import java.util.Collection; import java.util.List; @@ -34,7 +35,7 @@ public interface IConnector { * @param cache * @return */ - @NonNull + @Nullable public String getCacheUrl(final @NonNull Geocache cache); /** @@ -43,7 +44,7 @@ public interface IConnector { * @param cache * @return */ - @NonNull + @Nullable public String getLongCacheUrl(final @NonNull Geocache cache); /** diff --git a/main/src/cgeo/geocaching/connector/UnknownConnector.java b/main/src/cgeo/geocaching/connector/UnknownConnector.java index fcf1152..1ef1aff 100644 --- a/main/src/cgeo/geocaching/connector/UnknownConnector.java +++ b/main/src/cgeo/geocaching/connector/UnknownConnector.java @@ -4,6 +4,7 @@ import cgeo.geocaching.Geocache; import org.apache.commons.lang3.StringUtils; import org.eclipse.jdt.annotation.NonNull; +import org.eclipse.jdt.annotation.Nullable; class UnknownConnector extends AbstractConnector { @@ -14,9 +15,9 @@ class UnknownConnector extends AbstractConnector { } @Override - @NonNull + @Nullable public String getCacheUrl(@NonNull final Geocache cache) { - return StringUtils.EMPTY; + return null; } @Override |