Changeset 13767 in josm for trunk


Ignore:
Timestamp:
2018-05-15T02:23:48+02:00 (7 years ago)
Author:
Don-vip
Message:

load Preferences in ImageryCompare script to fix deep NPE at initialization

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/scripts/SyncEditorLayerIndex.groovy

    r13714 r13767  
    2323import javax.json.JsonReader
    2424
     25import org.openstreetmap.josm.data.Preferences
    2526import org.openstreetmap.josm.data.imagery.ImageryInfo
    2627import org.openstreetmap.josm.data.imagery.Shape
     28import org.openstreetmap.josm.data.preferences.JosmBaseDirectories
    2729import org.openstreetmap.josm.data.projection.Projections
    2830import org.openstreetmap.josm.data.validation.routines.DomainValidator
    2931import org.openstreetmap.josm.io.imagery.ImageryReader
     32import org.openstreetmap.josm.spi.preferences.Config
    3033
    3134class SyncEditorLayerIndex {
     
    5558        Locale.setDefault(Locale.ROOT);
    5659        parse_command_line_arguments(args)
     60        def pref = new Preferences(JosmBaseDirectories.getInstance())
     61        pref.init(false)
     62        Config.setPreferencesInstance(pref)
    5763        def script = new SyncEditorLayerIndex()
    5864        script.setupProj()
Note: See TracChangeset for help on using the changeset viewer.