Ignore:
Timestamp:
2018-05-26T19:36:19+02:00 (19 months ago)
Author:
Don-vip
Message:

SonarQube - fix minor code issues

Location:
trunk/src/org/openstreetmap/josm/data
Files:
1 added
3 edited

Legend:

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

    r13838 r13849  
    406406                continue;
    407407            Utils.instanceOfAndCast(e.getValue(), ListSetting.class)
    408                     .map(d -> d.getValue())
     408                    .map(ListSetting::getValue)
    409409                    .map(lst -> ColorInfo.fromPref(lst, false))
    410410                    .ifPresent(info -> all.put(e.getKey(), info));
     
    414414                continue;
    415415            Utils.instanceOfAndCast(e.getValue(), ListSetting.class)
    416                     .map(d -> d.getValue())
     416                    .map(ListSetting::getValue)
    417417                    .map(lst -> ColorInfo.fromPref(lst, true))
    418418                    .ifPresent(infoDef -> {
  • trunk/src/org/openstreetmap/josm/data/projection/ProjectionCLI.java

    r13207 r13849  
    3333    public static final ProjectionCLI INSTANCE = new ProjectionCLI();
    3434
    35     private boolean argInverse = false;         // NOPMD
    36     private boolean argSwitchInput = false;     // NOPMD
    37     private boolean argSwitchOutput = false;    // NOPMD
     35    private boolean argInverse;
     36    private boolean argSwitchInput;
     37    private boolean argSwitchOutput;
    3838
    3939    @Override
     
    7777            if (arg.isEmpty()) throw new IllegalArgumentException("non-empty argument expected");
    7878            if (arg.startsWith("+")) {
    79                 if (arg.equals("+to")) {
     79                if ("+to".equals(arg)) {
    8080                    toTokenSeen = true;
    8181                } else {
     
    142142        }
    143143
    144         if (files.isEmpty() || files.get(0).equals("-")) {
     144        if (files.isEmpty() || "-".equals(files.get(0))) {
    145145            processInput(fromProj, toProj, new BufferedReader(new InputStreamReader(System.in, Charset.defaultCharset())));
    146146        } else {
     
    174174    }
    175175
    176     private CustomProjection createProjection(String params) throws ProjectionConfigurationException {
     176    private static CustomProjection createProjection(String params) throws ProjectionConfigurationException {
    177177        CustomProjection proj = new CustomProjection();
    178178        proj.update(params);
  • trunk/src/org/openstreetmap/josm/data/validation/tests/WronglyOrderedWays.java

    r11129 r13849  
    3737
    3838        String natural = w.get("natural");
    39         if (natural == null)
     39        if (natural == null) {
    4040            return;
    41         else if ("coastline".equals(natural) && Geometry.isClockwise(w)) {
     41        } else if ("coastline".equals(natural) && Geometry.isClockwise(w)) {
    4242            reportError(w, tr("Reversed coastline: land not on left side"), WRONGLY_ORDERED_COAST);
    4343        } else if ("land".equals(natural) && Geometry.isClockwise(w)) {
    4444            reportError(w, tr("Reversed land: land not on left side"), WRONGLY_ORDERED_LAND);
    45         } else
    46             return;
    47 
     45        }
    4846    }
    4947
Note: See TracChangeset for help on using the changeset viewer.