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

sonar - pmd:OptimizableToArrayCall - Optimizable To Array Call

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/preferences/projection/ProjectionPreference.java

    r10611 r11017  
    22package org.openstreetmap.josm.gui.preferences.projection;
    33
     4import static org.openstreetmap.josm.data.SystemOfMeasurement.ALL_SYSTEMS;
    45import static org.openstreetmap.josm.tools.I18n.tr;
    56
     
    271272    private static final CollectionProperty PROP_SUB_PROJECTION = new CollectionProperty("projection.sub", null);
    272273    public static final StringProperty PROP_SYSTEM_OF_MEASUREMENT = new StringProperty("system_of_measurement", "Metric");
    273     private static final String[] unitsValues = (new ArrayList<>(SystemOfMeasurement.ALL_SYSTEMS.keySet())).toArray(new String[0]);
     274    private static final String[] unitsValues = ALL_SYSTEMS.keySet().toArray(new String[ALL_SYSTEMS.size()]);
    274275    private static final String[] unitsValuesTr = new String[unitsValues.length];
    275276    static {
     
    282283     * Combobox with all projections available
    283284     */
    284     private final JosmComboBox<ProjectionChoice> projectionCombo = new JosmComboBox<>(projectionChoices.toArray(new ProjectionChoice[0]));
     285    private final JosmComboBox<ProjectionChoice> projectionCombo = new JosmComboBox<>(
     286            projectionChoices.toArray(new ProjectionChoice[projectionChoices.size()]));
    285287
    286288    /**
Note: See TracChangeset for help on using the changeset viewer.