Changeset 34618 in osm for applications/editors/josm


Ignore:
Timestamp:
2018-09-03T21:16:12+02:00 (6 years ago)
Author:
donvip
Message:

fix warnings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/gpsblam/src/org/openstreetmap/josm/plugins/gpsblam/GPSBlamMode.java

    r33776 r34618  
    154154            g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);
    155155            g.setStroke(new BasicStroke(2.0f));
    156             if (p2==null)
     156            if (p2 == null)
    157157                p2 = p1;
    158158            double length = Math.sqrt((p2.x-p1.x)*(p2.x-p1.x)+(p2.y-p1.y)*(p2.y-p1.y));
     
    164164
    165165                Path2D path = new Path2D.Double();
    166                 path.append(new Line2D.Double(p1.x+ofsX, p1.y+ofsY,p2.x+ofsX, p2.y+ofsY), false);
    167                 path.append(new Arc2D.Double(p2.x-radius, p2.y-radius,radius*2, radius*2,
     166                path.append(new Line2D.Double(p1.x+ofsX, p1.y+ofsY, p2.x+ofsX, p2.y+ofsY), false);
     167                path.append(new Arc2D.Double(p2.x-radius, p2.y-radius, radius*2, radius*2,
    168168                        Math.toDegrees(angle), -180, Arc2D.OPEN), true);
    169                 path.append(new Line2D.Double(p2.x-ofsX, p2.y-ofsY,p1.x-ofsX, p1.y-ofsY), true);
    170                 path.append(new Arc2D.Double(p1.x-radius, p1.y-radius,radius*2, radius*2,
     169                path.append(new Line2D.Double(p2.x-ofsX, p2.y-ofsY, p1.x-ofsX, p1.y-ofsY), true);
     170                path.append(new Arc2D.Double(p1.x-radius, p1.y-radius, radius*2, radius*2,
    171171                        Math.toDegrees(angle)-180, -180, Arc2D.OPEN), true);
    172172                path.closePath();
     
    176176                    g.setXORMode(Color.BLACK);
    177177                    g.setColor(Color.WHITE);
    178                     g.drawOval(Math.round(p2.x-radius), Math.round(p2.y-radius),
    179                     Math.round(radius*2), Math.round(radius*2));
     178                    g.drawOval(p2.x-radius, p2.y-radius, radius*2, radius*2);
    180179                } catch (InternalError e) {
    181180                    // Robustness against Java bug https://bugs.openjdk.java.net/browse/JDK-8041647
    182181                    Logging.error(e);
    183                     Logging.error("Java bug JDK-8041647 occured. To avoid this bug, please consult https://bugs.openjdk.java.net/browse/JDK-8041647."
     182                    Logging.error(
     183                            "Java bug JDK-8041647 occured. To avoid this bug, please consult https://bugs.openjdk.java.net/browse/JDK-8041647."
    184184                            +" If the bug is fixed, please update your Java Runtime Environment.");
    185185                }
Note: See TracChangeset for help on using the changeset viewer.