Changeset 11389 in josm for trunk/src


Ignore:
Timestamp:
2016-12-13T12:41:03+01:00 (3 years ago)
Author:
Don-vip
Message:

findbugs - DLS_DEAD_LOCAL_STORE

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

Legend:

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

    r11114 r11389  
    150150                Collections.reverse(path);
    151151                List<Way> tempWays = unreversedWays;
    152                 unreversedWays = reversedWays;
     152                unreversedWays = null;
    153153                reversedWays = tempWays;
    154154            }
  • trunk/src/org/openstreetmap/josm/actions/OrthogonalizeAction.java

    r11374 r11389  
    4646            "(Afterwards, you can undo the movement for certain nodes:<br>"+
    4747            "Select them and press the shortcut for Orthogonalize / Undo. The default is Shift-Q.)");
     48
     49    private static final double EPSILON = 1E-6;
    4850
    4951    /**
     
    415417            final double dy = tmp.north() - n.getEastNorth().north();
    416418            if (headingNodes.contains(n)) { // The heading nodes should not have changed
    417                 final double epsilon = 1E-6;
    418                 if (Math.abs(dx) > Math.abs(epsilon * tmp.east()) ||
    419                         Math.abs(dy) > Math.abs(epsilon * tmp.east()))
    420                     throw new AssertionError();
     419                if (Math.abs(dx) > Math.abs(EPSILON * tmp.east()) ||
     420                    Math.abs(dy) > Math.abs(EPSILON * tmp.east()))
     421                    throw new AssertionError("heading node has changed");
    421422            } else {
    422423                OrthogonalizeAction.rememberMovements.put(n, new EastNorth(dx, dy));
  • trunk/src/org/openstreetmap/josm/tools/Diff.java

    r11107 r11389  
    812812                    if (end != iEnd && equivs[start] == equivs[end] && !otherChanged[1+j]
    813813                         && !((preceding >= 0 && start == preceding) || (otherPreceding >= 0 && otherStart == otherPreceding))) {
    814                         changed[1+end++] = true;
     814                        changed[1+end] = true;
    815815                        changed[1+start++] = false;
    816816                        ++i;
Note: See TracChangeset for help on using the changeset viewer.