More codacy fixes

This commit is contained in:
maskara 2017-04-02 22:49:38 +05:30
parent c14e2566f5
commit 94e9d2ff0e
5 changed files with 17 additions and 18 deletions

View file

@ -5,10 +5,9 @@ public class LatLng {
public final double latitude;
public final double longitude;
/**
* Accepts latitude and longitude
* @param latitude
* @param longitude
/** Accepts latitude and longitude.
* @param latitude double value
* @param longitude double value
*/
public LatLng(double latitude, double longitude) {
if(-180.0D <= longitude && longitude < 180.0D) {

View file

@ -23,7 +23,7 @@ public class LocationServiceManager implements LocationListener {
return latestLocation;
}
/** Registers a LocationManager to listen for current location
/** Registers a LocationManager to listen for current location.
*/
public void registerLocationManager() {
try {
@ -42,7 +42,7 @@ public class LocationServiceManager implements LocationListener {
}
}
/** Unregisters location manager
/** Unregisters location manager.
*/
public void unregisterLocationManager() {
try {

View file

@ -7,10 +7,10 @@ import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import java.util.List;
import fr.free.nrw.commons.R;
import java.util.List;
public class NearbyAdapter extends ArrayAdapter<Place> {
private List<Place> placesList;
private Context context;
@ -19,9 +19,9 @@ public class NearbyAdapter extends ArrayAdapter<Place> {
return placesList;
}
/** Accepts activity context and list of places
* @param context
* @param places
/** Accepts activity context and list of places.
* @param context activity context
* @param places list of places
*/
public NearbyAdapter(Context context, List<Place> places) {
super(context, R.layout.item_place, places);

View file

@ -19,13 +19,13 @@ import fr.free.nrw.commons.R;
import fr.free.nrw.commons.location.LatLng;
import fr.free.nrw.commons.location.LocationServiceManager;
import static fr.free.nrw.commons.utils.LengthUtils.computeDistanceBetween;
import static fr.free.nrw.commons.utils.LengthUtils.formatDistanceBetween;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import static fr.free.nrw.commons.utils.LengthUtils.computeDistanceBetween;
import static fr.free.nrw.commons.utils.LengthUtils.formatDistanceBetween;
public class NearbyListFragment extends ListFragment implements TaskListener {
private NearbyAsyncTask nearbyAsyncTask;

View file

@ -5,10 +5,10 @@ import fr.free.nrw.commons.location.LatLng;
import java.text.NumberFormat;
public class LengthUtils {
/** Returns a formatted distance string between two points
* @param point1
* @param point2
* @return
/** Returns a formatted distance string between two points.
* @param point1 LatLng type point1
* @param point2 LatLng type point2
* @return string distance
*/
public static String formatDistanceBetween(LatLng point1, LatLng point2) {
if (point1 == null || point2 == null) {