Changeset 34972 in osm


Ignore:
Timestamp:
2019-04-11T02:04:26+02:00 (5 years ago)
Author:
donvip
Message:

see #josm17580 #josm17581 #josm17582 #josm17583 #josm17584 #josm17585 #josm17586 #josm17587 #josm17588 - remove deprecated api (patches by taylor.smock)

Location:
applications/editors/josm/plugins
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/merge-overlap/src/mergeoverlap/MergeOverlapAction.java

    r34664 r34972  
    3737import org.openstreetmap.josm.tools.Shortcut;
    3838import org.openstreetmap.josm.tools.UserCancelException;
     39import org.openstreetmap.josm.tools.Utils;
    3940
    4041import mergeoverlap.hack.MyCombinePrimitiveResolverDialog;
     
    8081                ways.add(way);
    8182                List<Relation> rels = new ArrayList<>();
    82                 for (Relation r : OsmPrimitive.getFilteredList(way.getReferrers(), Relation.class)) {
     83                for (Relation r : Utils.filteredCollection(way.getReferrers(), Relation.class)) {
    8384                    rels.add(r);
    8485                }
  • applications/editors/josm/plugins/opendata/build.xml

    r34805 r34972  
    11<?xml version="1.0" encoding="utf-8"?>
    22<project name="opendata" default="dist" basedir=".">
    3     <property name="plugin.main.version" value="14347"/>
     3    <property name="plugin.main.version" value="14977"/>
    44    <property name="plugin.author" value="Don-vip"/>
    55    <property name="plugin.class" value="org.openstreetmap.josm.plugins.opendata.OdPlugin"/>
  • applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/GeographicReader.java

    r34899 r34972  
    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;
     
    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) {
  • applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/TabFiles.java

    r34019 r34972  
    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/**
     
    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) {
  • applications/editors/josm/plugins/print/build.xml

    r34547 r34972  
    55    <property name="commit.message" value="Added a field to specify the map scale."/>
    66    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    7     <property name="plugin.main.version" value="14153"/>
     7    <property name="plugin.main.version" value="14977"/>
    88
    99    <property name="plugin.author" value="Kai Pastor"/>
  • applications/editors/josm/plugins/print/src/org/openstreetmap/josm/plugins/print/PrintDialog.java

    r34547 r34972  
    6464import org.openstreetmap.josm.tools.GBC;
    6565import org.openstreetmap.josm.tools.Logging;
    66 import org.openstreetmap.josm.tools.Utils;
     66import org.openstreetmap.josm.tools.ReflectionUtils;
    6767
    6868/**
     
    524524                Method getEnumValueTable = realClass.getDeclaredMethod("getEnumValueTable");
    525525                Constructor<? extends Attribute> constructor = realClass.getDeclaredConstructor(int.class);
    526                 Utils.setObjectsAccessible(getEnumValueTable, constructor);
     526                ReflectionUtils.setObjectsAccessible(getEnumValueTable, constructor);
    527527                Attribute fakeInstance = constructor.newInstance(Integer.MAX_VALUE);
    528528                EnumSyntax[] enumTable = (EnumSyntax[]) getEnumValueTable.invoke(fakeInstance);
  • applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/SplittingMultipolygons.java

    r34551 r34972  
    3131import org.openstreetmap.josm.tools.Geometry;
    3232import org.openstreetmap.josm.tools.Geometry.PolygonIntersection;
     33import org.openstreetmap.josm.tools.Utils;
    3334
    3435/**
     
    253254
    254255        List<Way> ways = intersection(
    255                 OsmPrimitive.getFilteredList(segment.firstNode().getReferrers(), Way.class),
    256                 OsmPrimitive.getFilteredList(segment.lastNode().getReferrers(), Way.class));
     256                Utils.filteredCollection(segment.firstNode().getReferrers(), Way.class),
     257                Utils.filteredCollection(segment.lastNode().getReferrers(), Way.class));
    257258        ways.remove(segment);
    258259        for (Iterator<Way> iter = ways.iterator(); iter.hasNext();) {
  • applications/editors/josm/plugins/simplifyarea/src/org/openstreetmap/josm/plugins/simplifyarea/SimplifyAreaAction.java

    r34586 r34972  
    4040import org.openstreetmap.josm.tools.ImageProvider;
    4141import org.openstreetmap.josm.tools.Shortcut;
     42import org.openstreetmap.josm.tools.Utils;
    4243
    4344public final class SimplifyAreaAction extends JosmAction {
     
    108109            }
    109110        }
    110         final Collection<Way> ways = OsmPrimitive.getFilteredSet(selection, Way.class);
     111        final Collection<Way> ways = Utils.filteredCollection(selection, Way.class);
    111112        if (ways.isEmpty()) {
    112113            alertSelectAtLeastOneWay();
  • applications/editors/josm/plugins/terracer/src/org/openstreetmap/josm/plugins/terracer/TerracerAction.java

    r34584 r34972  
    4747import org.openstreetmap.josm.tools.Shortcut;
    4848import org.openstreetmap.josm.tools.UserCancelException;
     49import org.openstreetmap.josm.tools.Utils;
    4950
    5051/**
     
    119120                outline = (Way) prim;
    120121            } else if (sel.size() > 1) {
    121                 List<Way> ways = OsmPrimitive.getFilteredList(sel, Way.class);
     122                List<Way> ways = new ArrayList<>(Utils.filteredCollection(sel, Way.class));
    122123                Iterator<Way> wit = ways.iterator();
    123124                while (wit.hasNext()) {
     
    143144                    throw new InvalidUserInputException("no outline way found");
    144145
    145                 List<Node> nodes = OsmPrimitive.getFilteredList(sel, Node.class);
     146                List<Node> nodes = new ArrayList<>(Utils.filteredCollection(sel, Node.class));
    146147                Iterator<Node> nit = nodes.iterator();
    147148                // Actually this should test if the selected address nodes lie
Note: See TracChangeset for help on using the changeset viewer.