Changeset 18950 in josm


Ignore:
Timestamp:
2024-01-22T22:31:23+01:00 (11 months ago)
Author:
taylor.smock
Message:

ValidatorCLI: Fix an NPE when run prior to any call to Territories.initialize

There is currently no good way to see if the Territories data is initialized.
This does mean that tests will take a little bit longer.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/validation/ValidatorCLI.java

    r18870 r18950  
    2727import java.util.stream.Collectors;
    2828
    29 import jakarta.json.JsonObject;
    3029import org.apache.commons.compress.utils.FileNameUtils;
    3130import org.openstreetmap.josm.actions.ExtensionFileFilter;
     
    6564import org.openstreetmap.josm.tools.Utils;
    6665
     66import jakarta.json.JsonObject;
     67
    6768/**
    6869 * Add a validate command to the JOSM command line interface.
     
    356357        ProjectionRegistry.setProjection(Projections.getProjectionByCode("epsg:3857".toUpperCase(Locale.ROOT)));
    357358
    358         if (Territories.getKnownIso3166Codes().isEmpty()) {
    359             Territories.initializeInternalData();
    360         }
     359        Territories.initializeInternalData(); // There is no current way to check to see if territories is already initialized
    361360        OsmValidator.initialize();
    362361        MapPaintStyles.readFromPreferences();
Note: See TracChangeset for help on using the changeset viewer.