Changeset 18342 in josm for trunk


Ignore:
Timestamp:
2021-12-20T17:13:38+01:00 (3 years ago)
Author:
Don-vip
Message:

fix #21645 - code cleanup (patch by gaben)

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

Legend:

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

    r12669 r18342  
    5454
    5555    /**
    56      * Adds the coordinates of an other EastNorth instance to this one.
     56     * Adds the coordinates of another EastNorth instance to this one.
    5757     * @param other The other instance.
    5858     * @return The new EastNorth position.
     
    158158
    159159    /**
    160      * Returns an EastNorth representing the this EastNorth rotated around
     160     * Returns an EastNorth representing this EastNorth rotated around
    161161     * a given EastNorth by a given angle
    162162     * @param pivot the center of the rotation
  • trunk/src/org/openstreetmap/josm/gui/datatransfer/data/PrimitiveTagTransferData.java

    r10737 r18342  
    4242        for (PrimitiveData primitive : source) {
    4343            tags.get(primitive.getType()).add(TagCollection.from(primitive));
    44             counts.merge(primitive.getType(), 1, (a, b) -> a + b);
     44            counts.merge(primitive.getType(), 1, Integer::sum);
    4545        }
    4646    }
  • trunk/src/org/openstreetmap/josm/gui/preferences/ToolbarPreferences.java

    r18321 r18342  
    349349                if (ch == '\\' || ch == '(' || ch == '{' || ch == ',' || ch == ')' || ch == '}' || ch == '=') {
    350350                    result.append('\\');
    351                     result.append(ch);
    352                 } else {
    353                     result.append(ch);
    354                 }
     351                }
     352                result.append(ch);
    355353            }
    356354        }
  • trunk/src/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreference.java

    r17652 r18342  
    131131                    }
    132132                sources.removeSources(sourcesToRemove);
    133                 return true;
    134             } else {
    135                 return true;
    136133            }
     134            return true;
    137135        }
    138136    }
  • trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetReader.java

    r17636 r18342  
    218218                    lastIds.pop();
    219219                    ((Chunk) o).id = null;
    220                     continue;
    221220                } else {
    222221                    // if preset item contains an id, store a mapping for later usage
     
    224223                    lastIds.push(lastId);
    225224                    byId.put(lastId, new ArrayList<>());
    226                     continue;
    227                 }
     225                }
     226                continue;
    228227            } else if (!lastIds.isEmpty()) {
    229228                // add object to mapping for later usage
Note: See TracChangeset for help on using the changeset viewer.