Ignore:
Timestamp:
2018-08-11T16:10:32+02:00 (6 years ago)
Author:
Don-vip
Message:

see #15229 - deprecate all Main methods returning an URL

Location:
trunk/src/org/openstreetmap/josm/io
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/AbstractReader.java

    r14099 r14119  
    6262     * @param pp postprocessor
    6363     * @see #deregisterPostprocessor
    64      * @since xxx (moved from OsmReader)
     64     * @since 14119 (moved from OsmReader)
    6565     */
    6666    public static void registerPostprocessor(OsmServerReadPostprocessor pp) {
     
    7575     * @param pp postprocessor
    7676     * @see #registerPostprocessor
    77      * @since xxx (moved from OsmReader)
     77     * @since 14119 (moved from OsmReader)
    7878     */
    7979    public static void deregisterPostprocessor(OsmServerReadPostprocessor pp) {
  • trunk/src/org/openstreetmap/josm/io/CachedFile.java

    r13881 r14119  
    541541
    542542    private static void checkOfflineAccess(String urlString) {
    543         OnlineResource.JOSM_WEBSITE.checkOfflineAccess(urlString, Main.getJOSMWebsite());
     543        OnlineResource.JOSM_WEBSITE.checkOfflineAccess(urlString, Config.getUrls().getJOSMWebsite());
    544544        OnlineResource.OSM_API.checkOfflineAccess(urlString, OsmApi.getOsmApi().getServerUrl());
    545545    }
  • trunk/src/org/openstreetmap/josm/io/OsmApi.java

    r13647 r14119  
    3737import org.openstreetmap.josm.io.auth.CredentialsManager;
    3838import org.openstreetmap.josm.spi.preferences.Config;
     39import org.openstreetmap.josm.spi.preferences.IUrls;
    3940import org.openstreetmap.josm.tools.CheckParameterUtil;
    4041import org.openstreetmap.josm.tools.HttpClient;
     
    7374    /**
    7475     * Default URL of the standard OSM API.
     76     * @deprecated Use {@link IUrls#getDefaultOsmApiUrl}
    7577     * @since 5422
    7678     */
     79    @Deprecated
    7780    public static final String DEFAULT_API_URL = "https://api.openstreetmap.org/api";
    7881
     
    136139
    137140    private static String getServerUrlFromPref() {
    138         return Config.getPref().get("osm-server.url", DEFAULT_API_URL);
     141        return Config.getPref().get("osm-server.url", Config.getUrls().getDefaultOsmApiUrl());
    139142    }
    140143
  • trunk/src/org/openstreetmap/josm/io/OsmServerReader.java

    r14005 r14119  
    1414import javax.xml.parsers.ParserConfigurationException;
    1515
    16 import org.openstreetmap.josm.Main;
    1716import org.openstreetmap.josm.data.gpx.GpxData;
    1817import org.openstreetmap.josm.data.notes.Note;
     
    2120import org.openstreetmap.josm.io.auth.CredentialsAgentException;
    2221import org.openstreetmap.josm.io.auth.CredentialsManager;
     22import org.openstreetmap.josm.spi.preferences.Config;
    2323import org.openstreetmap.josm.tools.HttpClient;
    2424import org.openstreetmap.josm.tools.Logging;
     
    155155            boolean uncompressAccordingToContentDisposition, String httpMethod, byte[] requestBody) throws OsmTransferException {
    156156        try {
    157             OnlineResource.JOSM_WEBSITE.checkOfflineAccess(urlStr, Main.getJOSMWebsite());
     157            OnlineResource.JOSM_WEBSITE.checkOfflineAccess(urlStr, Config.getUrls().getJOSMWebsite());
    158158            OnlineResource.OSM_API.checkOfflineAccess(urlStr, OsmApi.getOsmApi().getServerUrl());
    159159
  • trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/ImportHandler.java

    r13929 r14119  
    1010import java.util.Set;
    1111
    12 import org.openstreetmap.josm.Main;
    1312import org.openstreetmap.josm.actions.downloadtasks.DownloadOsmTask;
    1413import org.openstreetmap.josm.actions.downloadtasks.DownloadTask;
     
    7574    public String[] getUsageExamples() {
    7675        return new String[] {"/import?url=" + Utils.encodeUrl(
    77                 Main.getJOSMWebsite()+"/browser/josm/trunk/data_nodist/direction-arrows.osm?format=txt")};
     76                Config.getUrls().getJOSMWebsite()+"/browser/josm/trunk/data_nodist/direction-arrows.osm?format=txt")};
    7877    }
    7978
Note: See TracChangeset for help on using the changeset viewer.