Skip to content

Commit

Permalink
remove most of the new PMD messages
Browse files Browse the repository at this point in the history
git-svn-id: https://josm.openstreetmap.de/svn/trunk@19295 0c6e7542-c601-0410-84e7-c038aed88b3b
  • Loading branch information
stoecker committed Jan 28, 2025
1 parent 3e43e20 commit c5c5355
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 24 deletions.
14 changes: 6 additions & 8 deletions src/org/openstreetmap/josm/data/SystemOfMeasurement.java
Original file line number Diff line number Diff line change
Expand Up @@ -304,14 +304,12 @@ public static SystemOfMeasurement getDefault() {
.map(LanguageInfo::getLocale)
.orElse(Locale.getDefault())
.getCountry();
switch (country) {
case "US":
// https://en.wikipedia.org/wiki/Metrication_in_the_United_States#Current_use
// Imperial units still used in transportation and Earth sciences
return IMPERIAL;
default:
return METRIC;
}
if (country == "US")
// https://en.wikipedia.org/wiki/Metrication_in_the_United_States#Current_use
// Imperial units still used in transportation and Earth sciences
return IMPERIAL;
else
return METRIC;
}

private static String formatText(double v, String unit, NumberFormat format) {
Expand Down
3 changes: 2 additions & 1 deletion src/org/openstreetmap/josm/data/gpx/GpxExtension.java
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,9 @@ public static XMLNamespace findNamespace(String prefix) {
return new XMLNamespace("gpxd", XML_URI_EXTENSIONS_DRAWING, XML_XSD_EXTENSIONS_DRAWING);
case "josm":
return new XMLNamespace("josm", XML_URI_EXTENSIONS_JOSM, XML_XSD_EXTENSIONS_JOSM);
default:
return null;
}
return null;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,8 @@ public Command fixError(TestError testError) {
public boolean isFixable(TestError testError) {
if (testError.getTester() instanceof UntaggedNode) {
int code = testError.getCode();
switch (code) {
case UNTAGGED_NODE_BLANK:
case UNTAGGED_NODE_CREATED_BY:
case UNTAGGED_NODE_WATCH:
case UNTAGGED_NODE_SOURCE:
if (code == UNTAGGED_NODE_BLANK || code == UNTAGGED_NODE_CREATED_BY
|| code == UNTAGGED_NODE_WATCH || code == UNTAGGED_NODE_SOURCE) {
return true;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,12 +180,13 @@ public LatLon getTheirCoords() {
*/
public LatLon getMergedCoords() {
switch (coordMergeDecision) {
case KEEP_MINE: return myCoords;
case KEEP_THEIR: return theirCoords;
case UNDECIDED: return null;
case KEEP_MINE:
return myCoords;
case KEEP_THEIR:
return theirCoords;
default:
return null;
}
// should not happen
return null;
}

/**
Expand Down Expand Up @@ -221,12 +222,13 @@ public Boolean getTheirDeletedState() {
*/
public Boolean getMergedDeletedState() {
switch (deletedMergeDecision) {
case KEEP_MINE: return myDeletedState;
case KEEP_THEIR: return theirDeletedState;
case UNDECIDED: return null;
case KEEP_MINE:
return myDeletedState;
case KEEP_THEIR:
return theirDeletedState;
default:
return null;
}
// should not happen
return null;
}

/**
Expand Down

0 comments on commit c5c5355

Please sign in to comment.