Ignore:
Timestamp:
2017-01-07T01:15:43+01:00 (7 years ago)
Author:
Don-vip
Message:

fix recent Sonar issues

File:
1 edited

Legend:

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

    r11431 r11436  
    144144
    145145    // copied value for line drawing
    146     private List<Integer> heatMapPolyX = new ArrayList<>();
    147     private List<Integer> heatMapPolyY = new ArrayList<>();
     146    private final List<Integer> heatMapPolyX = new ArrayList<>();
     147    private final List<Integer> heatMapPolyY = new ArrayList<>();
    148148
    149149    // setup color maps used by heat map
     
    369369                         "(" +
    370370                         "segments= " + visibleSegments.size() +
    371                          ", per 10000 = " + Utils.getDurationString(10000 * timeDiff / visibleSegments.size()) +
     371                         ", per 10000 = " + Utils.getDurationString(10_000 * timeDiff / visibleSegments.size()) +
    372372                         ")"
    373373              );
     
    449449            dateScale.setRange(minval, maxval);
    450450        }
    451 
    452451
    453452        // Now the colors for all the points will be assigned
     
    719718    }
    720719
    721    /**
     720    /**
    722721     * Draw GPX lines by using alpha blending
    723722     * @param g               the common draw object to use
     
    853852        // transform into lookup table
    854853        return colorTable;
    855     }
    856 
    857     /**
    858      * Creates a colormap by using a static color map with 1..n colors (RGB 0.0 ..1.0)
    859      * @param data array of multiple RGB color [n][3]
    860      * @return a dynamic list of color objects
    861      */
    862     protected static Color[] createColorFromRawArray(double[][] data) {
    863 
    864         // create the array
    865         Color[] color = new Color[ data.length ];
    866 
    867         for (int k = 0; k < data.length; k++) {
    868            // cast an map to linear array
    869            color[k] = new Color((float) data[k][0], (float) data[k][1], (float) data[k][2]);
    870         }
    871 
    872         // forward
    873         return createColorLut(color);
    874854    }
    875855
Note: See TracChangeset for help on using the changeset viewer.