Changeset 11377 in josm for trunk/src/org


Ignore:
Timestamp:
2016-12-10T15:26:36+01:00 (3 years ago)
Author:
Don-vip
Message:

findbugs - SE_BAD_FIELD

Location:
trunk/src/org/openstreetmap/josm/gui
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/dialogs/DeleteFromRelationConfirmationDialog.java

    r11366 r11377  
    187187    public static class RelationMemberTableModel extends DefaultTableModel {
    188188        private static class RelationToChildReferenceComparator implements Comparator<RelationToChildReference>, Serializable {
    189             private final NameFormatter nf = DefaultNameFormatter.getInstance();
    190 
    191189            @Override
    192190            public int compare(RelationToChildReference o1, RelationToChildReference o2) {
     191                NameFormatter nf = DefaultNameFormatter.getInstance();
    193192                int cmp = o1.getChild().getDisplayName(nf).compareTo(o2.getChild().getDisplayName(nf));
    194193                if (cmp != 0) return cmp;
  • trunk/src/org/openstreetmap/josm/gui/io/UploadSelectionDialog.java

    r11366 r11377  
    198198    static class OsmPrimitiveListModel extends AbstractListModel<OsmPrimitive> {
    199199        static final class OsmPrimitiveComparator implements Comparator<OsmPrimitive>, Serializable {
    200             private final DefaultNameFormatter formatter = DefaultNameFormatter.getInstance();
    201 
    202200            @Override
    203201            public int compare(OsmPrimitive o1, OsmPrimitive o2) {
     
    205203                if (ret != 0)
    206204                    return ret;
     205                DefaultNameFormatter formatter = DefaultNameFormatter.getInstance();
    207206                return o1.getDisplayName(formatter).compareTo(o1.getDisplayName(formatter));
    208207            }
Note: See TracChangeset for help on using the changeset viewer.