Ignore:
Timestamp:
2016-07-27T21:05:42+02:00 (8 years ago)
Author:
donvip
Message:

fix error-prone warning

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/measurement/src/org/openstreetmap/josm/plugins/measurement/MeasurementDialog.java

    r32454 r32732  
    9090    {
    9191        super(tr("Measured values"), "measure", tr("Open the measurement window."),
    92         Shortcut.registerShortcut("subwindow:measurement", tr("Toggle: {0}", tr("Measured values")),
    93         KeyEvent.VK_U, Shortcut.CTRL_SHIFT), 150);
     92                Shortcut.registerShortcut("subwindow:measurement", tr("Toggle: {0}", tr("Measured values")),
     93                        KeyEvent.VK_U, Shortcut.CTRL_SHIFT), 150);
    9494
    9595        resetButton = new SideButton(new AbstractAction() {
     
    139139
    140140        createLayout(valuePanel, false, Arrays.asList(new SideButton[] {
    141             resetButton
     141                resetButton
    142142        }));
    143143
     
    210210                        //http://local.wasp.uwa.edu.au/~pbourke/geometry/polyarea/
    211211                        wayArea += (MeasurementLayer.calcX(n.getCoor()) * MeasurementLayer.calcY(lastN.getCoor()))
    212                                  - (MeasurementLayer.calcY(n.getCoor()) * MeasurementLayer.calcX(lastN.getCoor()));
     212                                - (MeasurementLayer.calcY(n.getCoor()) * MeasurementLayer.calcX(lastN.getCoor()));
    213213                        segAngle = MeasurementLayer.angleBetween(lastN.getCoor(), n.getCoor());
    214214                    }
    215215                    lastN = n;
    216216                }
    217                 if (lastN != null && lastN == w.getNodes().iterator().next())
     217                if (lastN != null && lastN.equals(w.getNodes().iterator().next()))
    218218                    wayArea = Math.abs(wayArea / 2);
    219219                else
Note: See TracChangeset for help on using the changeset viewer.