Cleanup using AndroidStudio analyze.

This commit is contained in:
Dennis Guse
2024-07-11 07:38:45 +02:00
parent f5190aef06
commit d8eed2ccc9
11 changed files with 19 additions and 29 deletions
@@ -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) {