Ignore:
Timestamp:
2017-09-14T01:59:34+02:00 (19 months ago)
Author:
bastiK
Message:

see #15229 - extract "struct" handling from Preference to StructUtils

Location:
trunk/src/org/openstreetmap/josm/gui/io/importexport
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/io/importexport/WMSLayerExporter.java

    r12671 r12851  
    77import java.io.ObjectOutputStream;
    88
    9 import org.openstreetmap.josm.data.Preferences;
     9import org.openstreetmap.josm.data.StructUtils;
    1010import org.openstreetmap.josm.data.imagery.ImageryInfo.ImageryPreferenceEntry;
    1111import org.openstreetmap.josm.gui.MainApplication;
     
    4242                oos.writeObject(MainApplication.getMap().mapView.getCenter());
    4343                ImageryPreferenceEntry entry = new ImageryPreferenceEntry(((AbstractTileSourceLayer) layer).getInfo());
    44                 oos.writeObject(Preferences.serializeStruct(entry, ImageryPreferenceEntry.class));
     44                oos.writeObject(StructUtils.serializeStruct(entry, ImageryPreferenceEntry.class));
    4545            }
    4646        }
  • trunk/src/org/openstreetmap/josm/gui/io/importexport/WMSLayerImporter.java

    r12671 r12851  
    1212
    1313import org.openstreetmap.josm.actions.ExtensionFileFilter;
    14 import org.openstreetmap.josm.data.Preferences;
     14import org.openstreetmap.josm.data.StructUtils;
    1515import org.openstreetmap.josm.data.coor.EastNorth;
    1616import org.openstreetmap.josm.data.imagery.ImageryInfo;
     
    7272
    7373                @SuppressWarnings("unchecked")
    74                 ImageryPreferenceEntry entry = Preferences.deserializeStruct(
     74                ImageryPreferenceEntry entry = StructUtils.deserializeStruct(
    7575                        (Map<String, String>) ois.readObject(),
    7676                        ImageryPreferenceEntry.class);
Note: See TracChangeset for help on using the changeset viewer.