Changeset 19295 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2025-01-28T13:46:36+01:00 (4 weeks ago)
Author:
stoecker
Message:

remove most of the new PMD messages

Location:
trunk/src/org/openstreetmap/josm
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/SystemOfMeasurement.java

    r16991 r19295  
    305305                .orElse(Locale.getDefault())
    306306                .getCountry();
    307         switch (country) {
    308             case "US":
    309                 // https://en.wikipedia.org/wiki/Metrication_in_the_United_States#Current_use
    310                 // Imperial units still used in transportation and Earth sciences
    311                 return IMPERIAL;
    312             default:
    313                 return METRIC;
    314         }
     307        if (country == "US")
     308            // https://en.wikipedia.org/wiki/Metrication_in_the_United_States#Current_use
     309            // Imperial units still used in transportation and Earth sciences
     310            return IMPERIAL;
     311        else
     312            return METRIC;
    315313    }
    316314
  • trunk/src/org/openstreetmap/josm/data/gpx/GpxExtension.java

    r19080 r19295  
    9090        case "josm":
    9191            return new XMLNamespace("josm", XML_URI_EXTENSIONS_JOSM, XML_XSD_EXTENSIONS_JOSM);
    92         }
    93         return null;
     92        default:
     93            return null;
     94        }
    9495    }
    9596
  • trunk/src/org/openstreetmap/josm/data/validation/tests/UntaggedNode.java

    r19281 r19295  
    112112        if (testError.getTester() instanceof UntaggedNode) {
    113113            int code = testError.getCode();
    114             switch (code) {
    115             case UNTAGGED_NODE_BLANK:
    116             case UNTAGGED_NODE_CREATED_BY:
    117             case UNTAGGED_NODE_WATCH:
    118             case UNTAGGED_NODE_SOURCE:
     114            if (code == UNTAGGED_NODE_BLANK || code == UNTAGGED_NODE_CREATED_BY
     115                || code == UNTAGGED_NODE_WATCH || code == UNTAGGED_NODE_SOURCE) {
    119116                return true;
    120117            }
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/properties/PropertiesMergeModel.java

    r19050 r19295  
    181181    public LatLon getMergedCoords() {
    182182        switch (coordMergeDecision) {
    183         case KEEP_MINE: return myCoords;
    184         case KEEP_THEIR: return theirCoords;
    185         case UNDECIDED: return null;
    186         }
    187         // should not happen
    188         return null;
     183        case KEEP_MINE:
     184            return myCoords;
     185        case KEEP_THEIR:
     186            return theirCoords;
     187        default:
     188            return null;
     189        }
    189190    }
    190191
     
    222223    public Boolean getMergedDeletedState() {
    223224        switch (deletedMergeDecision) {
    224         case KEEP_MINE: return myDeletedState;
    225         case KEEP_THEIR: return theirDeletedState;
    226         case UNDECIDED: return null;
    227         }
    228         // should not happen
    229         return null;
     225        case KEEP_MINE:
     226            return myDeletedState;
     227        case KEEP_THEIR:
     228            return theirDeletedState;
     229        default:
     230            return null;
     231        }
    230232    }
    231233
Note: See TracChangeset for help on using the changeset viewer.