Ignore:
Timestamp:
2017-08-22T22:26:32+02:00 (7 years ago)
Author:
Don-vip
Message:

see #15182 - deprecate all Main logging methods and introduce suitable replacements in Logging for most of them

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

Legend:

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

    r12279 r12620  
    1515import javax.xml.parsers.ParserConfigurationException;
    1616
    17 import org.openstreetmap.josm.Main;
    1817import org.openstreetmap.josm.data.imagery.ImageryInfo;
    1918import org.openstreetmap.josm.data.imagery.ImageryInfo.ImageryBounds;
     
    2423import org.openstreetmap.josm.tools.JosmRuntimeException;
    2524import org.openstreetmap.josm.tools.LanguageInfo;
     25import org.openstreetmap.josm.tools.Logging;
    2626import org.openstreetmap.josm.tools.MultiMap;
    2727import org.openstreetmap.josm.tools.Utils;
     
    9797            throw e;
    9898        } catch (ParserConfigurationException e) {
    99             Main.error(e); // broken SAXException chaining
     99            Logging.error(e); // broken SAXException chaining
    100100            throw new SAXException(e);
    101101        }
     
    219219                                        atts.getValue("max-lon"), ",");
    220220                    } catch (IllegalArgumentException e) {
    221                         Main.trace(e);
     221                        Logging.trace(e);
    222222                        break;
    223223                    }
     
    252252                        shape.addPoint(atts.getValue("lat"), atts.getValue("lon"));
    253253                    } catch (IllegalArgumentException e) {
    254                         Main.trace(e);
     254                        Logging.trace(e);
    255255                        break;
    256256                    }
  • trunk/src/org/openstreetmap/josm/io/imagery/WMSImagery.java

    r12557 r12620  
    2525import javax.xml.parsers.ParserConfigurationException;
    2626
    27 import org.openstreetmap.josm.Main;
    2827import org.openstreetmap.josm.data.Bounds;
    2928import org.openstreetmap.josm.data.imagery.ImageryInfo;
     
    3130import org.openstreetmap.josm.tools.HttpClient;
    3231import org.openstreetmap.josm.tools.HttpClient.Response;
     32import org.openstreetmap.josm.tools.Logging;
    3333import org.openstreetmap.josm.tools.Utils;
    3434import org.w3c.dom.Document;
     
    223223            serviceUrl = new URL(serviceUrlStr);
    224224        } catch (HeadlessException e) {
    225             Main.warn(e);
     225            Logging.warn(e);
    226226            return;
    227227        }
     
    229229        final Response response = HttpClient.create(getCapabilitiesUrl).connect();
    230230        final String incomingData = response.fetchContent();
    231         Main.debug("Server response to Capabilities request:");
    232         Main.debug(incomingData);
     231        Logging.debug("Server response to Capabilities request:");
     232        Logging.debug(incomingData);
    233233
    234234        if (response.getResponseCode() >= 400) {
     
    239239            DocumentBuilder builder = Utils.newSafeDOMBuilder();
    240240            builder.setEntityResolver((publicId, systemId) -> {
    241                 Main.info("Ignoring DTD " + publicId + ", " + systemId);
     241                Logging.info("Ignoring DTD " + publicId + ", " + systemId);
    242242                return new InputSource(new StringReader(""));
    243243            });
     
    267267                String baseURL = child.getAttribute("xlink:href");
    268268                if (!baseURL.equals(serviceUrlStr)) {
    269                     Main.info("GetCapabilities specifies a different service URL: " + baseURL);
     269                    Logging.info("GetCapabilities specifies a different service URL: " + baseURL);
    270270                    serviceUrl = new URL(baseURL);
    271271                }
     
    283283        boolean isFormatSupported = isImageFormatSupported(format);
    284284        if (!isFormatSupported) {
    285             Main.info("Skipping unsupported image format {0}", format);
     285            Logging.info("Skipping unsupported image format {0}", format);
    286286        }
    287287        return isFormatSupported;
Note: See TracChangeset for help on using the changeset viewer.