Ticket #17586: 17586.patch

File 17586.patch, 2.3 KB (added by taylor.smock, 6 years ago)

Replace deprecated functions

  • src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/GeographicReader.java

     
    6363import org.openstreetmap.josm.tools.ImageProvider;
    6464import org.openstreetmap.josm.tools.ImageProvider.ImageSizes;
    6565import org.openstreetmap.josm.tools.Logging;
     66import org.openstreetmap.josm.tools.ReflectionUtils;
    6667import org.openstreetmap.josm.tools.UserCancelException;
    6768import org.openstreetmap.josm.tools.Utils;
    6869
     
    353354                    if (epsgCode != null) {
    354355                        try {
    355356                            Field f = AbstractIdentifiedObject.class.getDeclaredField("identifiers");
    356                             Utils.setObjectsAccessible(f);
     357                            ReflectionUtils.setObjectsAccessible(f);
    357358                            f.set(crs, Collections.singleton(new NamedIdentifier(Citations.fromName("EPSG"), epsgCode.toString())));
    358359                        } catch (ReflectiveOperationException | SecurityException e) {
    359360                            Logging.error(e);
  • src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/TabFiles.java

     
    1818import org.geotools.util.URLs;
    1919import org.openstreetmap.josm.tools.JosmRuntimeException;
    2020import org.openstreetmap.josm.tools.Logging;
    21 import org.openstreetmap.josm.tools.Utils;
     21import org.openstreetmap.josm.tools.ReflectionUtils;
    2222
    2323/**
    2424 * Extension of {@link ShpFiles} class modified to fit MapInfo TAB needs.
     
    3939
    4040        try {
    4141            Field furls = ShpFiles.class.getDeclaredField("urls");
    42             Utils.setObjectsAccessible(furls);
     42            ReflectionUtils.setObjectsAccessible(furls);
    4343            urls = (Map<ShpFileType, URL>) furls.get(this);
    4444        } catch (ReflectiveOperationException e) {
    4545            throw new JosmRuntimeException(e);