Changeset 14586 in josm for trunk/src


Ignore:
Timestamp:
2018-12-22T13:07:40+01:00 (5 years ago)
Author:
GerdP
Message:

Fix some findbugs warnings, no functional change

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/ShapeClipper.java

    r14584 r14586  
    6969                points[num++] = x;
    7070                points[num++] = y;
    71             } else if (type != PathIterator.SEG_CLOSE) {
    72                     //Logging.warn("unhandled path iterator");
     71                // } else if (type != PathIterator.SEG_CLOSE) {
     72                //Logging.warn("unhandled path iterator");
    7373            }
    7474            pit.next();
     
    116116        if (num < 2)
    117117            return null;
    118         if (points[0] == points[num - 2] && points[1] == points[num - 1])
     118        if (Double.compare(points[0], points[num - 2]) == 0 && Double.compare(points[1], points[num - 1]) == 0) {
    119119            num -= 2;
     120        }
    120121        if (num < 6)
    121122            return null;
     
    154155
    155156        int countVals = num;
    156         if (points[0] == points[num - 2] && points[1] == points[num - 1]) {
     157        if (Double.compare(points[0], points[num - 2]) == 0 && Double.compare(points[1], points[num - 1]) == 0) {
    157158            countVals -= 2;
    158159        }
     160
    159161        double[] outputList = points;
    160162        double[] input;
Note: See TracChangeset for help on using the changeset viewer.