Ignore:
Timestamp:
2017-04-15T01:38:46+02:00 (2 years ago)
Author:
Don-vip
Message:

sonar - squid:S1192 - String literals should not be duplicated

Location:
trunk/src/org/openstreetmap/josm/actions
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/mapmode/ImproveWayAccuracyAction.java

    r11713 r11913  
    5757        SelectionChangedListener, ModifierListener {
    5858
     59    private static final String CROSSHAIR = "crosshair";
     60
    5961    private enum State {
    6062        SELECTING, IMPROVING
     
    7678    private final Cursor cursorSelect = ImageProvider.getCursor("normal", "mode");
    7779    private final Cursor cursorSelectHover = ImageProvider.getCursor("hand", "mode");
    78     private final Cursor cursorImprove = ImageProvider.getCursor("crosshair", null);
    79     private final Cursor cursorImproveAdd = ImageProvider.getCursor("crosshair", "addnode");
    80     private final Cursor cursorImproveDelete = ImageProvider.getCursor("crosshair", "delete_node");
    81     private final Cursor cursorImproveAddLock = ImageProvider.getCursor("crosshair", "add_node_lock");
    82     private final Cursor cursorImproveLock = ImageProvider.getCursor("crosshair", "lock");
     80    private final Cursor cursorImprove = ImageProvider.getCursor(CROSSHAIR, null);
     81    private final Cursor cursorImproveAdd = ImageProvider.getCursor(CROSSHAIR, "addnode");
     82    private final Cursor cursorImproveDelete = ImageProvider.getCursor(CROSSHAIR, "delete_node");
     83    private final Cursor cursorImproveAddLock = ImageProvider.getCursor(CROSSHAIR, "add_node_lock");
     84    private final Cursor cursorImproveLock = ImageProvider.getCursor(CROSSHAIR, "lock");
    8385
    8486    private Color guideColor;
  • trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java

    r11713 r11913  
    6868public class SelectAction extends MapMode implements ModifierListener, KeyPressReleaseListener, SelectionEnded {
    6969
     70    private static final String NORMAL = "normal";
     71
    7072    /**
    7173     * Select action mode.
     
    8587    // contains all possible cases the cursor can be in the SelectAction
    8688    private enum SelectActionCursor {
    87         rect("normal", /* ICON(cursor/modifier/) */ "selection"),
    88         rect_add("normal", /* ICON(cursor/modifier/) */ "select_add"),
    89         rect_rm("normal", /* ICON(cursor/modifier/) */ "select_remove"),
    90         way("normal", /* ICON(cursor/modifier/) */ "select_way"),
    91         way_add("normal", /* ICON(cursor/modifier/) */ "select_way_add"),
    92         way_rm("normal", /* ICON(cursor/modifier/) */ "select_way_remove"),
    93         node("normal", /* ICON(cursor/modifier/) */ "select_node"),
    94         node_add("normal", /* ICON(cursor/modifier/) */ "select_node_add"),
    95         node_rm("normal", /* ICON(cursor/modifier/) */ "select_node_remove"),
    96         virtual_node("normal", /* ICON(cursor/modifier/) */ "addnode"),
    97         scale(/* ICON(cursor/) */ "scale", null),
    98         rotate(/* ICON(cursor/) */ "rotate", null),
    99         merge(/* ICON(cursor/) */ "crosshair", null),
    100         lasso("normal", /* ICON(cursor/modifier/) */ "rope"),
    101         merge_to_node("crosshair", /* ICON(cursor/modifier/) */ "joinnode"),
     89
     90        rect(NORMAL, "selection"),
     91        rect_add(NORMAL, "select_add"),
     92        rect_rm(NORMAL, "select_remove"),
     93        way(NORMAL, "select_way"),
     94        way_add(NORMAL, "select_way_add"),
     95        way_rm(NORMAL, "select_way_remove"),
     96        node(NORMAL, "select_node"),
     97        node_add(NORMAL, "select_node_add"),
     98        node_rm(NORMAL, "select_node_remove"),
     99        virtual_node(NORMAL, "addnode"),
     100        scale("scale", null),
     101        rotate("rotate", null),
     102        merge("crosshair", null),
     103        lasso(NORMAL, "rope"),
     104        merge_to_node("crosshair", "joinnode"),
    102105        move(Cursor.MOVE_CURSOR);
    103106
  • trunk/src/org/openstreetmap/josm/actions/upload/FixDataHook.java

    r10601 r11913  
    2727public class FixDataHook implements UploadHook {
    2828
     29    private static final String ONEWAY = "oneway";
     30
    2931    /**
    3032     * List of checks to run on data
     
    4042        deprecated.add(new FixDataKey("color",            "colour"));
    4143        deprecated.add(new FixDataTag("highway", "ford",  "ford",    "yes"));
    42         deprecated.add(new FixDataTag("oneway",  "false", "oneway",  "no"));
    43         deprecated.add(new FixDataTag("oneway",  "0",     "oneway",  "no"));
    44         deprecated.add(new FixDataTag("oneway",  "true",  "oneway",  "yes"));
    45         deprecated.add(new FixDataTag("oneway",  "1",     "oneway",  "yes"));
     44        deprecated.add(new FixDataTag(ONEWAY,    "false",  ONEWAY,   "no"));
     45        deprecated.add(new FixDataTag(ONEWAY,    "0",      ONEWAY,   "no"));
     46        deprecated.add(new FixDataTag(ONEWAY,    "true",   ONEWAY,   "yes"));
     47        deprecated.add(new FixDataTag(ONEWAY,    "1",      ONEWAY,   "yes"));
    4648        deprecated.add(new FixDataTag("highway", "stile", "barrier", "stile"));
    4749        // CHECKSTYLE.ON: SingleSpaceSeparator
Note: See TracChangeset for help on using the changeset viewer.