Ignore:
Timestamp:
2016-09-17T23:28:38+02:00 (3 years ago)
Author:
Don-vip
Message:

sonar - pmd:OptimizableToArrayCall - Optimizable To Array Call

Location:
trunk/src/org/openstreetmap/josm/actions
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/AbstractMergeAction.java

    r10074 r11017  
    5959
    6060    protected static Layer askTargetLayer(List<Layer> targetLayers) {
    61         return askTargetLayer(targetLayers.toArray(new Layer[0]),
     61        return askTargetLayer(targetLayers.toArray(new Layer[targetLayers.size()]),
    6262                tr("Please select the target layer."),
    6363                tr("Select target layer"),
  • trunk/src/org/openstreetmap/josm/actions/AddImageryLayerAction.java

    r10714 r11017  
    1212import java.net.MalformedURLException;
    1313import java.util.HashSet;
     14import java.util.List;
    1415import java.util.Set;
    1516
     
    9293            final WMSLayerTree tree = new WMSLayerTree();
    9394            tree.updateTree(wms);
    94             final JComboBox<String> formats = new JComboBox<>(wms.getFormats().toArray(new String[0]));
     95            List<String> wmsFormats = wms.getFormats();
     96            final JComboBox<String> formats = new JComboBox<>(wmsFormats.toArray(new String[wmsFormats.size()]));
    9597            formats.setSelectedItem(wms.getPreferredFormats());
    9698            formats.setToolTipText(tr("Select image format for WMS layer"));
Note: See TracChangeset for help on using the changeset viewer.