Ignore:
Timestamp:
2016-03-12T19:18:29+01:00 (10 years ago)
Author:
Don-vip
Message:

sonar - Add parentheses to make the operator precedence explicit + add unit tests

File:
1 edited

Legend:

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

    r9572 r9968  
    535535                // existing way or make a new way of its own? The "alt" modifier means that the
    536536                // user wants a new way.
    537                 Way way = alt ? null : (selectedWay != null) ? selectedWay : getWayForNode(n0);
     537                Way way = alt ? null : (selectedWay != null ? selectedWay : getWayForNode(n0));
    538538                Way wayToSelect;
    539539
     
    15651565                    e0 = p0.east();
    15661566                    n0 = p0.north();
    1567                     buildLabelText((nearestAngle <= 180) ? nearestAngle : nearestAngle-360);
     1567                    buildLabelText((nearestAngle <= 180) ? nearestAngle : (nearestAngle-360));
    15681568
    15691569                    phi = (nearestAngle + activeBaseHeading) * Math.PI / 180;
Note: See TracChangeset for help on using the changeset viewer.