Changeset 10741 in josm
- Timestamp:
- 2016-08-06T00:00:24+02:00 (8 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/com/kitfox/svg/SVGUniverse.java
r8149 r10741 63 63 import javax.imageio.ImageIO; 64 64 import javax.xml.bind.DatatypeConverter; 65 import javax.xml.parsers.ParserConfigurationException; 66 import javax.xml.parsers.SAXParserFactory; 65 67 import org.xml.sax.EntityResolver; 66 68 import org.xml.sax.InputSource; … … 68 70 import org.xml.sax.SAXParseException; 69 71 import org.xml.sax.XMLReader; 70 import org.xml.sax.helpers.XMLReaderFactory;71 72 72 73 /** … … 574 575 } 575 576 576 private XMLReader getXMLReaderCached() throws SAXException 577 private XMLReader getXMLReaderCached() throws SAXException, ParserConfigurationException 577 578 { 578 579 if (cachedReader == null) 579 580 { 580 cachedReader = XMLReaderFactory.createXMLReader(); 581 SAXParserFactory factory = SAXParserFactory.newInstance(); 582 factory.setNamespaceAware(true); 583 cachedReader = factory.newSAXParser().getXMLReader(); 581 584 } 582 585 return cachedReader; -
trunk/src/org/openstreetmap/josm/tools/ImageProvider.java
r10731 r10741 56 56 import javax.swing.ImageIcon; 57 57 import javax.xml.bind.DatatypeConverter; 58 import javax.xml.parsers.ParserConfigurationException; 58 59 59 60 import org.openstreetmap.josm.Main; … … 80 81 import org.xml.sax.XMLReader; 81 82 import org.xml.sax.helpers.DefaultHandler; 82 import org.xml.sax.helpers.XMLReaderFactory;83 83 84 84 import com.kitfox.svg.SVGDiagram; … … 1216 1216 private static String getImgUrlFromWikiInfoPage(final String base, final String fn) { 1217 1217 try { 1218 final XMLReader parser = XMLReaderFactory.createXMLReader();1218 final XMLReader parser = Utils.newSafeSAXParser().getXMLReader(); 1219 1219 parser.setContentHandler(new DefaultHandler() { 1220 1220 @Override … … 1239 1239 Main.trace(r); 1240 1240 return r.getResult(); 1241 } catch (IOException | SAXException e) {1241 } catch (IOException | SAXException | ParserConfigurationException e) { 1242 1242 Main.warn("Parsing " + base + fn + " failed:\n" + e); 1243 1243 return null;
Note:
See TracChangeset
for help on using the changeset viewer.