Ignore:
Timestamp:
2016-05-11T04:44:00+02:00 (8 years ago)
Author:
Don-vip
Message:

sonar - squid:S2184 - Math operands should be cast before assignment

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

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/layer/Layer.java

    r10153 r10181  
    169169    public void hookUpMapView() {
    170170        // calculate total memory needed for all layers
    171         long memoryBytesRequired = 50 * 1024 * 1024; // assumed minimum JOSM memory footprint
     171        long memoryBytesRequired = 50L * 1024L * 1024L; // assumed minimum JOSM memory footprint
    172172        if (Main.map != null && Main.map.mapView != null) {
    173173            for (Layer layer: Main.map.mapView.getAllLayers()) {
  • trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java

    r10176 r10181  
    925925                    lblTimezone.setText(tr("Timezone: {0}", timezone.formatTimezone()));
    926926                    lblMinutes.setText(tr("Minutes: {0}", sldMinutes.getValue()));
    927                     lblSeconds.setText(tr("Seconds: {0}", Offset.milliseconds(100 * sldSeconds.getValue()).formatOffset()));
     927                    lblSeconds.setText(tr("Seconds: {0}", Offset.milliseconds(100L * sldSeconds.getValue()).formatOffset()));
    928928
    929929                    delta = Offset.milliseconds(100 * sldSeconds.getValue()
  • trunk/src/org/openstreetmap/josm/gui/layer/gpx/GpxDrawHelper.java

    r10175 r10181  
    419419                            || screen.y < oldA.y - delta || screen.y > oldA.y + delta)) {
    420420                        g.setColor(trkPnt.customColoring);
    421                         double t = Math.atan2(screen.y - old.y, screen.x - old.x) + Math.PI;
     421                        double t = Math.atan2((double) screen.y - old.y, (double) screen.x - old.x) + Math.PI;
    422422                        g.drawLine(screen.x, screen.y, (int) (screen.x + 10 * Math.cos(t - PHI)),
    423423                                (int) (screen.y + 10 * Math.sin(t - PHI)));
Note: See TracChangeset for help on using the changeset viewer.