Ignore:
Timestamp:
2020-05-16T20:59:34+02:00 (4 years ago)
Author:
simon04
Message:

see #18712 - Add NetworkManager.isOffline(String) to test offline status of given URL

Deprecates OnlineResource.checkOfflineAccess(String, String)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/imagery/CachedAttributionBingAerialTileSource.java

    r14746 r16426  
    1515import org.openstreetmap.josm.gui.util.GuiHelper;
    1616import org.openstreetmap.josm.io.CacheCustomContent;
    17 import org.openstreetmap.josm.io.OnlineResource;
     17import org.openstreetmap.josm.io.NetworkManager;
    1818import org.openstreetmap.josm.tools.HttpClient;
    1919import org.openstreetmap.josm.tools.Logging;
     
    6363
    6464        @Override
    65         protected void checkOfflineAccess() {
     65        protected boolean isOffline() {
    6666            try {
    67                 String attributionUrl = getAttributionUrl().toExternalForm();
    68                 OnlineResource.ALL.checkOfflineAccess(attributionUrl, attributionUrl);
     67                return NetworkManager.isOffline(getAttributionUrl().toExternalForm());
    6968            } catch (MalformedURLException e) {
    7069                Logging.error(e);
     70                return false;
    7171            }
    7272        }
Note: See TracChangeset for help on using the changeset viewer.