Ignore:
Timestamp:
2016-08-06T00:00:24+02:00 (3 years ago)
Author:
Don-vip
Message:

see #11924 - XMLReaderFactory has been deprecated in Java 9, see https://bugs.openjdk.java.net/browse/JDK-8152912

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/ImageProvider.java

    r10731 r10741  
    5656import javax.swing.ImageIcon;
    5757import javax.xml.bind.DatatypeConverter;
     58import javax.xml.parsers.ParserConfigurationException;
    5859
    5960import org.openstreetmap.josm.Main;
     
    8081import org.xml.sax.XMLReader;
    8182import org.xml.sax.helpers.DefaultHandler;
    82 import org.xml.sax.helpers.XMLReaderFactory;
    8383
    8484import com.kitfox.svg.SVGDiagram;
     
    12161216    private static String getImgUrlFromWikiInfoPage(final String base, final String fn) {
    12171217        try {
    1218             final XMLReader parser = XMLReaderFactory.createXMLReader();
     1218            final XMLReader parser = Utils.newSafeSAXParser().getXMLReader();
    12191219            parser.setContentHandler(new DefaultHandler() {
    12201220                @Override
     
    12391239            Main.trace(r);
    12401240            return r.getResult();
    1241         } catch (IOException | SAXException e) {
     1241        } catch (IOException | SAXException | ParserConfigurationException e) {
    12421242            Main.warn("Parsing " + base + fn + " failed:\n" + e);
    12431243            return null;
Note: See TracChangeset for help on using the changeset viewer.