Ignore:
Timestamp:
2017-12-17T00:42:54+01:00 (7 years ago)
Author:
Don-vip
Message:

enable PMD rule OptimizableToArrayCall

Location:
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java

    r13173 r13206  
    16101610
    16111611            // We use parallel sort here. This is only available for arrays.
    1612             StyleRecord[] sorted = allStyleElems.toArray(new StyleRecord[allStyleElems.size()]);
     1612            StyleRecord[] sorted = allStyleElems.toArray(new StyleRecord[0]);
    16131613            Arrays.parallelSort(sorted, null);
    16141614
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/relations/Multipolygon.java

    r12881 r13206  
    1515
    1616import org.openstreetmap.josm.Main;
    17 import org.openstreetmap.josm.spi.preferences.PreferenceChangeEvent;
    18 import org.openstreetmap.josm.spi.preferences.PreferenceChangedListener;
    1917import org.openstreetmap.josm.data.coor.EastNorth;
    2018import org.openstreetmap.josm.data.osm.DataSet;
     
    2927import org.openstreetmap.josm.data.projection.Projection;
    3028import org.openstreetmap.josm.spi.preferences.Config;
     29import org.openstreetmap.josm.spi.preferences.PreferenceChangeEvent;
     30import org.openstreetmap.josm.spi.preferences.PreferenceChangedListener;
    3131import org.openstreetmap.josm.tools.Geometry;
    3232import org.openstreetmap.josm.tools.Geometry.AreaAndPerimeter;
     
    580580    public static Collection<JoinedWay> joinWays(Collection<Way> waysToJoin) {
    581581        final Collection<JoinedWay> result = new ArrayList<>();
    582         final Way[] joinArray = waysToJoin.toArray(new Way[waysToJoin.size()]);
     582        final Way[] joinArray = waysToJoin.toArray(new Way[0]);
    583583        int left = waysToJoin.size();
    584584        while (left > 0) {
Note: See TracChangeset for help on using the changeset viewer.