diff options
| author | Bananeweizen <bananeweizen@gmx.de> | 2014-01-27 18:46:47 +0100 |
|---|---|---|
| committer | Bananeweizen <bananeweizen@gmx.de> | 2014-01-27 18:46:47 +0100 |
| commit | 1a449e147dbc0c71761085934347bff57fd908a4 (patch) | |
| tree | 5e29ce9b12ce2f17d37ae52d8526f35841e32761 /main/src/cgeo/geocaching/maps | |
| parent | c5014115aeef1d259f2a3cad0c03398f12ec5561 (diff) | |
| download | cgeo-1a449e147dbc0c71761085934347bff57fd908a4.zip cgeo-1a449e147dbc0c71761085934347bff57fd908a4.tar.gz cgeo-1a449e147dbc0c71761085934347bff57fd908a4.tar.bz2 | |
remove some nullness warnings in Eclipse
Diffstat (limited to 'main/src/cgeo/geocaching/maps')
3 files changed, 8 insertions, 1 deletions
diff --git a/main/src/cgeo/geocaching/maps/google/GoogleMapView.java b/main/src/cgeo/geocaching/maps/google/GoogleMapView.java index 471e061..610dbe1 100644 --- a/main/src/cgeo/geocaching/maps/google/GoogleMapView.java +++ b/main/src/cgeo/geocaching/maps/google/GoogleMapView.java @@ -18,6 +18,7 @@ import com.google.android.maps.GeoPoint; import com.google.android.maps.MapView; import org.apache.commons.lang3.reflect.MethodUtils; +import org.eclipse.jdt.annotation.NonNull; import android.app.Activity; import android.content.Context; @@ -89,6 +90,7 @@ public class GoogleMapView extends MapView implements MapViewImpl { } @Override + @NonNull public GeoPointImpl getMapViewCenter() { GeoPoint point = getMapCenter(); return new GoogleGeoPoint(point.getLatitudeE6(), point.getLongitudeE6()); diff --git a/main/src/cgeo/geocaching/maps/interfaces/MapViewImpl.java b/main/src/cgeo/geocaching/maps/interfaces/MapViewImpl.java index c30f65f..5ae8e15 100644 --- a/main/src/cgeo/geocaching/maps/interfaces/MapViewImpl.java +++ b/main/src/cgeo/geocaching/maps/interfaces/MapViewImpl.java @@ -4,6 +4,8 @@ import cgeo.geocaching.geopoint.Viewport; import cgeo.geocaching.maps.CachesOverlay; import cgeo.geocaching.maps.PositionAndScaleOverlay; +import org.eclipse.jdt.annotation.NonNull; + import android.app.Activity; import android.content.Context; import android.graphics.drawable.Drawable; @@ -26,6 +28,7 @@ public interface MapViewImpl { void destroyDrawingCache(); + @NonNull GeoPointImpl getMapViewCenter(); int getLatitudeSpan(); @@ -73,7 +76,7 @@ public interface MapViewImpl { /** * Indicates if the current map view supports different themes * for map rendering - * + * * @return true - supports custom themes, false - does not support custom themes */ boolean hasMapThemes(); diff --git a/main/src/cgeo/geocaching/maps/mapsforge/v024/MapsforgeMapView024.java b/main/src/cgeo/geocaching/maps/mapsforge/v024/MapsforgeMapView024.java index 6573304..30caed5 100644 --- a/main/src/cgeo/geocaching/maps/mapsforge/v024/MapsforgeMapView024.java +++ b/main/src/cgeo/geocaching/maps/mapsforge/v024/MapsforgeMapView024.java @@ -13,6 +13,7 @@ import cgeo.geocaching.maps.interfaces.OnMapDragListener; import cgeo.geocaching.settings.Settings; import cgeo.geocaching.utils.Log; +import org.eclipse.jdt.annotation.NonNull; import org.mapsforge.android.mapsold.GeoPoint; import org.mapsforge.android.mapsold.MapDatabase; import org.mapsforge.android.mapsold.MapView; @@ -65,6 +66,7 @@ public class MapsforgeMapView024 extends MapView implements MapViewImpl { } @Override + @NonNull public GeoPointImpl getMapViewCenter() { GeoPoint point = getMapCenter(); return new MapsforgeGeoPoint(point.getLatitudeE6(), point.getLongitudeE6()); |
