forked from upstream-mirrors/OpenTracks
Cleanup using AndroidStudio analyze.
This commit is contained in:
@@ -310,7 +310,7 @@ public class GPXTrackExporter implements TrackExporter {
|
||||
}
|
||||
|
||||
public Distance writeTrackPoint(ZoneOffset zoneOffset, TrackPoint trackPoint, List<TrackPoint> sensorPoints, Distance trackDistance) {
|
||||
Distance cumulativeDistance = null;
|
||||
Distance cumulativeDistance;
|
||||
|
||||
printWriter.println("<trkpt " + formatLocation(trackPoint.getLatitude(), trackPoint.getLongitude()) + ">");
|
||||
|
||||
|
||||
@@ -498,7 +498,7 @@ public class KMLTrackExporter implements TrackExporter {
|
||||
}
|
||||
|
||||
private void writeTypeLocalized(String localizedValue) {
|
||||
if (localizedValue == null || localizedValue.equals("")) {
|
||||
if (localizedValue == null || localizedValue.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
printWriter.println("<ExtendedData>");
|
||||
|
||||
@@ -414,7 +414,7 @@ public class KmlTrackImporter extends DefaultHandler implements XMLImporter.Trac
|
||||
Float value = null;
|
||||
if (content != null) {
|
||||
content = content.trim();
|
||||
if (!"".equals(content)) {
|
||||
if (!content.isEmpty()) {
|
||||
try {
|
||||
value = Float.parseFloat(content);
|
||||
} catch (NumberFormatException e) {
|
||||
|
||||
Reference in New Issue
Block a user