Ignore:
Timestamp:
2012-01-24T21:52:43+01:00 (12 years ago)
Author:
jttt
Message:

Use final were appropriate

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateNode.java

    r4806 r4869  
    55import static org.openstreetmap.josm.tools.I18n.tr;
    66
    7 import java.awt.GridBagLayout;
    8 import java.awt.geom.Area;
    97import java.util.ArrayList;
    108import java.util.Collection;
     
    1614import java.util.Map;
    1715import java.util.Set;
    18 
    19 import javax.swing.JLabel;
    20 import javax.swing.JOptionPane;
    21 import javax.swing.JPanel;
    2216
    2317import org.openstreetmap.josm.Main;
     
    3529import org.openstreetmap.josm.data.validation.Test;
    3630import org.openstreetmap.josm.data.validation.TestError;
    37 import org.openstreetmap.josm.gui.ConditionalOptionPaneUtil;
    3831import org.openstreetmap.josm.gui.progress.ProgressMonitor;
    3932import org.openstreetmap.josm.tools.MultiMap;
     
    5447                    Math.round(o.getCoor().lat() / precision) * precision,
    5548                    Math.round(o.getCoor().lon() / precision) * precision
    56             );
     49                    );
    5750        }
    5851
     
    8275    }
    8376
    84     protected static int DUPLICATE_NODE = 1;
    85     protected static int DUPLICATE_NODE_MIXED = 2;
    86     protected static int DUPLICATE_NODE_OTHER = 3;
    87     protected static int DUPLICATE_NODE_UNCLOSED = 4;
    88     protected static int DUPLICATE_NODE_BUILDING = 10;
    89     protected static int DUPLICATE_NODE_BOUNDARY = 11;
    90     protected static int DUPLICATE_NODE_HIGHWAY = 12;
    91     protected static int DUPLICATE_NODE_LANDUSE = 13;
    92     protected static int DUPLICATE_NODE_NATURAL = 14;
    93     protected static int DUPLICATE_NODE_POWER = 15;
    94     protected static int DUPLICATE_NODE_RAILWAY = 16;
    95     protected static int DUPLICATE_NODE_WATERWAY = 17;
     77    protected final static int DUPLICATE_NODE = 1;
     78    protected final static int DUPLICATE_NODE_MIXED = 2;
     79    protected final static int DUPLICATE_NODE_OTHER = 3;
     80    protected final static int DUPLICATE_NODE_UNCLOSED = 4;
     81    protected final static int DUPLICATE_NODE_BUILDING = 10;
     82    protected final static int DUPLICATE_NODE_BOUNDARY = 11;
     83    protected final static int DUPLICATE_NODE_HIGHWAY = 12;
     84    protected final static int DUPLICATE_NODE_LANDUSE = 13;
     85    protected final static int DUPLICATE_NODE_NATURAL = 14;
     86    protected final static int DUPLICATE_NODE_POWER = 15;
     87    protected final static int DUPLICATE_NODE_RAILWAY = 16;
     88    protected final static int DUPLICATE_NODE_WATERWAY = 17;
    9689
    9790    /** The map of potential duplicates.
     
    204197                            DUPLICATE_NODE_UNCLOSED,
    205198                            mm.get(tagSet)
    206                     ));
     199                            ));
    207200                } else if (nbType>1) {
    208201                    String msg = marktr("Mixed type duplicated nodes");
     
    215208                            DUPLICATE_NODE_MIXED,
    216209                            mm.get(tagSet)
    217                     ));
     210                            ));
    218211                } else if (typeMap.get("highway")) {
    219212                    String msg = marktr("Highway duplicated nodes");
     
    226219                            DUPLICATE_NODE_HIGHWAY,
    227220                            mm.get(tagSet)
    228                     ));
     221                            ));
    229222                } else if (typeMap.get("railway")) {
    230223                    String msg = marktr("Railway duplicated nodes");
     
    237230                            DUPLICATE_NODE_RAILWAY,
    238231                            mm.get(tagSet)
    239                     ));
     232                            ));
    240233                } else if (typeMap.get("waterway")) {
    241234                    String msg = marktr("Waterway duplicated nodes");
     
    248241                            DUPLICATE_NODE_WATERWAY,
    249242                            mm.get(tagSet)
    250                     ));
     243                            ));
    251244                } else if (typeMap.get("boundary")) {
    252245                    String msg = marktr("Boundary duplicated nodes");
     
    259252                            DUPLICATE_NODE_BOUNDARY,
    260253                            mm.get(tagSet)
    261                     ));
     254                            ));
    262255                } else if (typeMap.get("power")) {
    263256                    String msg = marktr("Power duplicated nodes");
     
    270263                            DUPLICATE_NODE_POWER,
    271264                            mm.get(tagSet)
    272                     ));
     265                            ));
    273266                } else if (typeMap.get("natural")) {
    274267                    String msg = marktr("Natural duplicated nodes");
     
    281274                            DUPLICATE_NODE_NATURAL,
    282275                            mm.get(tagSet)
    283                     ));
     276                            ));
    284277                } else if (typeMap.get("building")) {
    285278                    String msg = marktr("Building duplicated nodes");
     
    292285                            DUPLICATE_NODE_BUILDING,
    293286                            mm.get(tagSet)
    294                     ));
     287                            ));
    295288                } else if (typeMap.get("landuse")) {
    296289                    String msg = marktr("Landuse duplicated nodes");
     
    303296                            DUPLICATE_NODE_LANDUSE,
    304297                            mm.get(tagSet)
    305                     ));
     298                            ));
    306299                } else {
    307300                    String msg = marktr("Other duplicated nodes");
     
    314307                            DUPLICATE_NODE_OTHER,
    315308                            mm.get(tagSet)
    316                     ));
     309                            ));
    317310
    318311                }
     
    336329                        DUPLICATE_NODE,
    337330                        duplicates
    338                 ));
     331                        ));
    339332            }
    340333        }
Note: See TracChangeset for help on using the changeset viewer.