Changeset 13901 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2018-06-08T22:43:20+02:00 (6 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 1 added
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/imagery/GetCapabilitiesParseHelper.java
r13828 r13901 9 9 10 10 import javax.xml.namespace.QName; 11 import javax.xml.stream.XMLInputFactory;12 11 import javax.xml.stream.XMLStreamException; 13 12 import javax.xml.stream.XMLStreamReader; 14 13 15 14 import org.openstreetmap.josm.tools.Utils; 15 import org.openstreetmap.josm.tools.XmlUtils; 16 16 17 17 /** … … 82 82 */ 83 83 public static XMLStreamReader getReader(InputStream in) throws XMLStreamException { 84 XMLInputFactory factory = XMLInputFactory.newInstance(); 85 // do not try to load external entities, nor validate the XML 86 factory.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, Boolean.FALSE); 87 factory.setProperty(XMLInputFactory.IS_VALIDATING, Boolean.FALSE); 88 factory.setProperty(XMLInputFactory.SUPPORT_DTD, Boolean.FALSE); 89 return factory.createXMLStreamReader(in); 84 return XmlUtils.newSafeXMLInputFactory().createXMLStreamReader(in); 90 85 } 91 86 -
trunk/src/org/openstreetmap/josm/data/preferences/PreferencesReader.java
r13715 r13901 21 21 22 22 import javax.xml.XMLConstants; 23 import javax.xml.stream.XMLInputFactory;24 23 import javax.xml.stream.XMLStreamConstants; 25 24 import javax.xml.stream.XMLStreamException; … … 37 36 import org.openstreetmap.josm.spi.preferences.StringSetting; 38 37 import org.openstreetmap.josm.tools.Logging; 39 import org.openstreetmap.josm.tools. Utils;38 import org.openstreetmap.josm.tools.XmlUtils; 40 39 import org.xml.sax.SAXException; 41 40 … … 97 96 public static void validateXML(Reader in) throws IOException, SAXException { 98 97 try (CachedFile cf = new CachedFile("resource://data/preferences.xsd"); InputStream xsdStream = cf.getInputStream()) { 99 Schema schema = Utils.newXmlSchemaFactory().newSchema(new StreamSource(xsdStream));98 Schema schema = XmlUtils.newXmlSchemaFactory().newSchema(new StreamSource(xsdStream)); 100 99 Validator validator = schema.newValidator(); 101 100 validator.validate(new StreamSource(in)); … … 127 126 public void parse() throws XMLStreamException, IOException { 128 127 if (reader != null) { 129 this.parser = X MLInputFactory.newInstance().createXMLStreamReader(reader);128 this.parser = XmlUtils.newSafeXMLInputFactory().createXMLStreamReader(reader); 130 129 doParse(); 131 130 } else { 132 131 try (BufferedReader in = Files.newBufferedReader(file.toPath(), StandardCharsets.UTF_8)) { 133 this.parser = X MLInputFactory.newInstance().createXMLStreamReader(in);132 this.parser = XmlUtils.newSafeXMLInputFactory().createXMLStreamReader(in); 134 133 doParse(); 135 134 } -
trunk/src/org/openstreetmap/josm/gui/io/CustomConfigurator.java
r13331 r13901 35 35 import javax.xml.transform.Transformer; 36 36 import javax.xml.transform.TransformerException; 37 import javax.xml.transform.TransformerFactory;38 37 import javax.xml.transform.TransformerFactoryConfigurationError; 39 38 import javax.xml.transform.dom.DOMSource; … … 53 52 import org.openstreetmap.josm.tools.Logging; 54 53 import org.openstreetmap.josm.tools.Utils; 54 import org.openstreetmap.josm.tools.XmlUtils; 55 55 import org.w3c.dom.DOMException; 56 56 import org.w3c.dom.Document; … … 228 228 try { 229 229 String toXML = Main.pref.toXML(true); 230 DocumentBuilder builder = Utils.newSafeDOMBuilder();230 DocumentBuilder builder = XmlUtils.newSafeDOMBuilder(); 231 231 document = builder.parse(new ByteArrayInputStream(toXML.getBytes(StandardCharsets.UTF_8))); 232 232 exportDocument = builder.newDocument(); … … 258 258 } 259 259 File f = new File(filename); 260 Transformer ts = TransformerFactory.newInstance().newTransformer();260 Transformer ts = XmlUtils.newSafeTransformerFactory().newTransformer(); 261 261 ts.setOutputProperty(OutputKeys.INDENT, "yes"); 262 262 ts.transform(new DOMSource(exportDocument), new StreamResult(f.toURI().getPath())); … … 406 406 public void openAndReadXML(InputStream is) { 407 407 try { 408 Document document = Utils.parseSafeDOM(is);408 Document document = XmlUtils.parseSafeDOM(is); 409 409 synchronized (CustomConfigurator.class) { 410 410 processXML(document); … … 681 681 Preferences tmpPref = new Preferences(); 682 682 try { 683 Transformer xformer = TransformerFactory.newInstance().newTransformer();683 Transformer xformer = XmlUtils.newSafeTransformerFactory().newTransformer(); 684 684 CharArrayWriter outputWriter = new CharArrayWriter(8192); 685 685 StreamResult out = new StreamResult(outputWriter); -
trunk/src/org/openstreetmap/josm/gui/oauth/TestAccessTokenTask.java
r12620 r13901 27 27 import org.openstreetmap.josm.tools.Utils; 28 28 import org.openstreetmap.josm.tools.XmlParsingException; 29 import org.openstreetmap.josm.tools.XmlUtils; 29 30 import org.w3c.dom.Document; 30 31 import org.xml.sax.SAXException; … … 124 125 throw new OsmApiException(connection.getResponse().getResponseCode(), 125 126 connection.getResponse().getHeaderField("Error"), null); 126 Document d = Utils.parseSafeDOM(connection.getResponse().getContent());127 Document d = XmlUtils.parseSafeDOM(connection.getResponse().getContent()); 127 128 return OsmServerUserInfoReader.buildFromXML(d); 128 129 } catch (SAXException | ParserConfigurationException e) { -
trunk/src/org/openstreetmap/josm/io/Capabilities.java
r13120 r13901 14 14 15 15 import org.openstreetmap.josm.tools.Logging; 16 import org.openstreetmap.josm.tools. Utils;16 import org.openstreetmap.josm.tools.XmlUtils; 17 17 import org.xml.sax.Attributes; 18 18 import org.xml.sax.InputSource; … … 274 274 public static Capabilities parse(InputSource inputSource) throws SAXException, IOException, ParserConfigurationException { 275 275 CapabilitiesParser parser = new CapabilitiesParser(); 276 Utils.parseSafeSAX(inputSource, parser);276 XmlUtils.parseSafeSAX(inputSource, parser); 277 277 return parser.getCapabilities(); 278 278 } -
trunk/src/org/openstreetmap/josm/io/DiffResultProcessor.java
r13453 r13901 28 28 import org.openstreetmap.josm.tools.Utils; 29 29 import org.openstreetmap.josm.tools.XmlParsingException; 30 import org.openstreetmap.josm.tools.XmlUtils; 30 31 import org.xml.sax.Attributes; 31 32 import org.xml.sax.InputSource; … … 92 93 progressMonitor.beginTask(tr("Parsing response from server...")); 93 94 InputSource inputSource = new InputSource(new StringReader(diffUploadResponse)); 94 Utils.parseSafeSAX(inputSource, new Parser());95 XmlUtils.parseSafeSAX(inputSource, new Parser()); 95 96 } catch (XmlParsingException e) { 96 97 throw e; -
trunk/src/org/openstreetmap/josm/io/GpxReader.java
r13194 r13901 27 27 import org.openstreetmap.josm.data.gpx.WayPoint; 28 28 import org.openstreetmap.josm.tools.Logging; 29 import org.openstreetmap.josm.tools. Utils;29 import org.openstreetmap.josm.tools.XmlUtils; 30 30 import org.xml.sax.Attributes; 31 31 import org.xml.sax.InputSource; … … 582 582 Parser parser = new Parser(); 583 583 try { 584 Utils.parseSafeSAX(inputSource, parser);584 XmlUtils.parseSafeSAX(inputSource, parser); 585 585 return true; 586 586 } catch (SAXException e) { -
trunk/src/org/openstreetmap/josm/io/NameFinder.java
r12620 r13901 24 24 import org.openstreetmap.josm.tools.UncheckedParseException; 25 25 import org.openstreetmap.josm.tools.Utils; 26 import org.openstreetmap.josm.tools.XmlUtils; 26 27 import org.xml.sax.Attributes; 27 28 import org.xml.sax.InputSource; … … 89 90 InputSource inputSource = new InputSource(reader); 90 91 NameFinderResultParser parser = new NameFinderResultParser(); 91 Utils.parseSafeSAX(inputSource, parser);92 XmlUtils.parseSafeSAX(inputSource, parser); 92 93 return parser.getResult(); 93 94 } -
trunk/src/org/openstreetmap/josm/io/NoteReader.java
r12620 r13901 20 20 import org.openstreetmap.josm.data.osm.User; 21 21 import org.openstreetmap.josm.tools.Logging; 22 import org.openstreetmap.josm.tools. Utils;22 import org.openstreetmap.josm.tools.XmlUtils; 23 23 import org.openstreetmap.josm.tools.date.DateUtils; 24 24 import org.xml.sax.Attributes; … … 216 216 DefaultHandler parser = new Parser(); 217 217 try { 218 Utils.parseSafeSAX(inputSource, parser);218 XmlUtils.parseSafeSAX(inputSource, parser); 219 219 } catch (ParserConfigurationException e) { 220 220 Logging.error(e); // broken SAXException chaining -
trunk/src/org/openstreetmap/josm/io/OsmChangesetContentParser.java
r12620 r13901 18 18 import org.openstreetmap.josm.tools.CheckParameterUtil; 19 19 import org.openstreetmap.josm.tools.Logging; 20 import org.openstreetmap.josm.tools.Utils;21 20 import org.openstreetmap.josm.tools.XmlParsingException; 21 import org.openstreetmap.josm.tools.XmlUtils; 22 22 import org.xml.sax.Attributes; 23 23 import org.xml.sax.InputSource; … … 153 153 progressMonitor.beginTask(""); 154 154 progressMonitor.indeterminateSubTask(tr("Parsing changeset content ...")); 155 Utils.parseSafeSAX(source, new Parser());155 XmlUtils.parseSafeSAX(source, new Parser()); 156 156 } catch (XmlParsingException e) { 157 157 throw e; -
trunk/src/org/openstreetmap/josm/io/OsmChangesetParser.java
r12495 r13901 20 20 import org.openstreetmap.josm.data.osm.User; 21 21 import org.openstreetmap.josm.gui.progress.ProgressMonitor; 22 import org.openstreetmap.josm.tools.Utils;23 22 import org.openstreetmap.josm.tools.XmlParsingException; 23 import org.openstreetmap.josm.tools.XmlUtils; 24 24 import org.openstreetmap.josm.tools.date.DateUtils; 25 25 import org.xml.sax.Attributes; … … 280 280 progressMonitor.indeterminateSubTask(tr("Parsing list of changesets...")); 281 281 InputSource inputSource = new InputSource(new InvalidXmlCharacterFilter(new InputStreamReader(source, StandardCharsets.UTF_8))); 282 Utils.parseSafeSAX(inputSource, parser.new Parser());282 XmlUtils.parseSafeSAX(inputSource, parser.new Parser()); 283 283 return parser.getChangesets(); 284 284 } catch (ParserConfigurationException | SAXException e) { -
trunk/src/org/openstreetmap/josm/io/OsmHistoryReader.java
r12620 r13901 17 17 import org.openstreetmap.josm.tools.CheckParameterUtil; 18 18 import org.openstreetmap.josm.tools.Logging; 19 import org.openstreetmap.josm.tools. Utils;19 import org.openstreetmap.josm.tools.XmlUtils; 20 20 import org.xml.sax.Attributes; 21 21 import org.xml.sax.InputSource; … … 92 92 progressMonitor.beginTask(tr("Parsing OSM history data ...")); 93 93 try { 94 Utils.parseSafeSAX(inputSource, new Parser());94 XmlUtils.parseSafeSAX(inputSource, new Parser()); 95 95 } catch (ParserConfigurationException e) { 96 96 Logging.error(e); // broken SAXException chaining -
trunk/src/org/openstreetmap/josm/io/OsmReader.java
r13559 r13901 17 17 18 18 import javax.xml.stream.Location; 19 import javax.xml.stream.XMLInputFactory;20 19 import javax.xml.stream.XMLStreamConstants; 21 20 import javax.xml.stream.XMLStreamException; … … 29 28 import org.openstreetmap.josm.data.osm.DataSet; 30 29 import org.openstreetmap.josm.data.osm.DownloadPolicy; 31 import org.openstreetmap.josm.data.osm.UploadPolicy;32 30 import org.openstreetmap.josm.data.osm.Node; 33 31 import org.openstreetmap.josm.data.osm.NodeData; … … 38 36 import org.openstreetmap.josm.data.osm.RelationMemberData; 39 37 import org.openstreetmap.josm.data.osm.Tagged; 38 import org.openstreetmap.josm.data.osm.UploadPolicy; 40 39 import org.openstreetmap.josm.data.osm.User; 41 40 import org.openstreetmap.josm.data.osm.Way; … … 47 46 import org.openstreetmap.josm.tools.UncheckedParseException; 48 47 import org.openstreetmap.josm.tools.Utils; 48 import org.openstreetmap.josm.tools.XmlUtils; 49 49 import org.openstreetmap.josm.tools.date.DateUtils; 50 50 … … 619 619 620 620 try (InputStreamReader ir = UTFInputStreamReader.create(source)) { 621 XMLInputFactory factory = XMLInputFactory.newInstance(); 622 // do not try to load external entities 623 factory.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, Boolean.FALSE); 624 factory.setProperty(XMLInputFactory.SUPPORT_DTD, Boolean.FALSE); 625 setParser(factory.createXMLStreamReader(ir)); 621 setParser(XmlUtils.newSafeXMLInputFactory().createXMLStreamReader(ir)); 626 622 parse(); 627 623 } -
trunk/src/org/openstreetmap/josm/io/OsmServerReader.java
r13499 r13901 25 25 import org.openstreetmap.josm.tools.Utils; 26 26 import org.openstreetmap.josm.tools.XmlParsingException; 27 import org.openstreetmap.josm.tools.XmlUtils; 27 28 import org.w3c.dom.Document; 28 29 import org.w3c.dom.Node; … … 503 504 monitor.indeterminateSubTask(subtask); 504 505 try (InputStream in = getInputStream(api, monitor.createSubTaskMonitor(1, true), reason)) { 505 return parser.parse( Utils.parseSafeDOM(in));506 return parser.parse(XmlUtils.parseSafeDOM(in)); 506 507 } 507 508 } catch (OsmTransferException e) { -
trunk/src/org/openstreetmap/josm/io/imagery/ImageryReader.java
r13796 r13901 28 28 import org.openstreetmap.josm.tools.MultiMap; 29 29 import org.openstreetmap.josm.tools.Utils; 30 import org.openstreetmap.josm.tools.XmlUtils; 30 31 import org.xml.sax.Attributes; 31 32 import org.xml.sax.InputSource; … … 97 98 .getContentReader()) { 98 99 InputSource is = new InputSource(in); 99 Utils.parseSafeSAX(is, parser);100 XmlUtils.parseSafeSAX(is, parser); 100 101 return parser.entries; 101 102 } -
trunk/src/org/openstreetmap/josm/io/session/SessionReader.java
r13204 r13901 48 48 import org.openstreetmap.josm.tools.MultiMap; 49 49 import org.openstreetmap.josm.tools.Utils; 50 import org.openstreetmap.josm.tools.XmlUtils; 50 51 import org.w3c.dom.Document; 51 52 import org.w3c.dom.Element; … … 742 743 743 744 try { 744 parseJos( Utils.parseSafeDOM(josIS), progressMonitor);745 parseJos(XmlUtils.parseSafeDOM(josIS), progressMonitor); 745 746 } catch (SAXException e) { 746 747 throw new IllegalDataException(e); -
trunk/src/org/openstreetmap/josm/io/session/SessionWriter.java
r13204 r13901 23 23 import javax.xml.transform.Transformer; 24 24 import javax.xml.transform.TransformerException; 25 import javax.xml.transform.TransformerFactory;26 25 import javax.xml.transform.dom.DOMSource; 27 26 import javax.xml.transform.stream.StreamResult; … … 46 45 import org.openstreetmap.josm.tools.MultiMap; 47 46 import org.openstreetmap.josm.tools.Utils; 47 import org.openstreetmap.josm.tools.XmlUtils; 48 48 import org.w3c.dom.Document; 49 49 import org.w3c.dom.Element; … … 206 206 DocumentBuilder builder = null; 207 207 try { 208 builder = Utils.newSafeDOMBuilder();208 builder = XmlUtils.newSafeDOMBuilder(); 209 209 } catch (ParserConfigurationException e) { 210 210 throw new IOException(e); … … 311 311 OutputStreamWriter writer = new OutputStreamWriter(out, StandardCharsets.UTF_8); 312 312 writer.write("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"); 313 TransformerFactory transfac = TransformerFactory.newInstance(); 314 Transformer trans = transfac.newTransformer(); 313 Transformer trans = XmlUtils.newSafeTransformerFactory().newTransformer(); 315 314 trans.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes"); 316 315 trans.setOutputProperty(OutputKeys.INDENT, "yes"); -
trunk/src/org/openstreetmap/josm/tools/ImageProvider.java
r13869 r13901 1267 1267 private static String getImgUrlFromWikiInfoPage(final String base, final String fn) { 1268 1268 try { 1269 final XMLReader parser = Utils.newSafeSAXParser().getXMLReader();1269 final XMLReader parser = XmlUtils.newSafeSAXParser().getXMLReader(); 1270 1270 parser.setContentHandler(new DefaultHandler() { 1271 1271 @Override -
trunk/src/org/openstreetmap/josm/tools/Utils.java
r13838 r13901 67 67 import javax.script.ScriptEngine; 68 68 import javax.script.ScriptEngineManager; 69 import javax.xml.XMLConstants;70 69 import javax.xml.parsers.DocumentBuilder; 71 import javax.xml.parsers.DocumentBuilderFactory;72 70 import javax.xml.parsers.ParserConfigurationException; 73 71 import javax.xml.parsers.SAXParser; 74 import javax.xml.parsers.SAXParserFactory;75 72 import javax.xml.validation.SchemaFactory; 76 import javax.xml.validation.SchemaFactoryConfigurationError;77 73 78 74 import org.openstreetmap.josm.spi.preferences.Config; … … 1339 1335 * Returns the W3C XML Schema factory implementation. Robust method dealing with ContextClassLoader problems. 1340 1336 * @return the W3C XML Schema factory implementation 1337 * @deprecated Use {@link XmlUtils#newXmlSchemaFactory} 1341 1338 * @since 13715 1342 1339 */ 1340 @Deprecated 1343 1341 public static SchemaFactory newXmlSchemaFactory() { 1344 try { 1345 return SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); 1346 } catch (SchemaFactoryConfigurationError e) { 1347 Logging.debug(e); 1348 // Can happen with icedtea-web. Use workaround from https://issues.apache.org/jira/browse/GERONIMO-6185 1349 Thread currentThread = Thread.currentThread(); 1350 ClassLoader old = currentThread.getContextClassLoader(); 1351 currentThread.setContextClassLoader(null); 1352 try { 1353 return SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); 1354 } finally { 1355 currentThread.setContextClassLoader(old); 1356 } 1357 } 1342 return XmlUtils.newXmlSchemaFactory(); 1358 1343 } 1359 1344 … … 1362 1347 * @return a new secure DOM builder, supporting XML namespaces 1363 1348 * @throws ParserConfigurationException if a parser cannot be created which satisfies the requested configuration. 1349 * @deprecated Use {@link XmlUtils#newSafeDOMBuilder} 1364 1350 * @since 10404 1365 1351 */ 1352 @Deprecated 1366 1353 public static DocumentBuilder newSafeDOMBuilder() throws ParserConfigurationException { 1367 DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance(); 1368 builderFactory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true); 1369 builderFactory.setNamespaceAware(true); 1370 builderFactory.setValidating(false); 1371 return builderFactory.newDocumentBuilder(); 1354 return XmlUtils.newSafeDOMBuilder(); 1372 1355 } 1373 1356 … … 1381 1364 * @throws IOException if any IO errors occur. 1382 1365 * @throws SAXException for SAX errors. 1366 * @deprecated Use {@link XmlUtils#parseSafeDOM} 1383 1367 * @since 10404 1384 1368 */ 1369 @Deprecated 1385 1370 public static Document parseSafeDOM(InputStream is) throws ParserConfigurationException, IOException, SAXException { 1386 long start = System.currentTimeMillis(); 1387 Logging.debug("Starting DOM parsing of {0}", is); 1388 Document result = newSafeDOMBuilder().parse(is); 1389 if (Logging.isDebugEnabled()) { 1390 Logging.debug("DOM parsing done in {0}", getDurationString(System.currentTimeMillis() - start)); 1391 } 1392 return result; 1371 return XmlUtils.parseSafeDOM(is); 1393 1372 } 1394 1373 … … 1398 1377 * @throws ParserConfigurationException if a parser cannot be created which satisfies the requested configuration. 1399 1378 * @throws SAXException for SAX errors. 1379 * @deprecated Use {@link XmlUtils#newSafeSAXParser} 1400 1380 * @since 8287 1401 1381 */ 1382 @Deprecated 1402 1383 public static SAXParser newSafeSAXParser() throws ParserConfigurationException, SAXException { 1403 SAXParserFactory parserFactory = SAXParserFactory.newInstance(); 1404 parserFactory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true); 1405 parserFactory.setNamespaceAware(true); 1406 return parserFactory.newSAXParser(); 1384 return XmlUtils.newSafeSAXParser(); 1407 1385 } 1408 1386 … … 1416 1394 * @throws SAXException for SAX errors. 1417 1395 * @throws IOException if any IO errors occur. 1396 * @deprecated Use {@link XmlUtils#parseSafeSAX} 1418 1397 * @since 8347 1419 1398 */ 1399 @Deprecated 1420 1400 public static void parseSafeSAX(InputSource is, DefaultHandler dh) throws ParserConfigurationException, SAXException, IOException { 1421 long start = System.currentTimeMillis(); 1422 Logging.debug("Starting SAX parsing of {0} using {1}", is, dh); 1423 newSafeSAXParser().parse(is, dh); 1424 if (Logging.isDebugEnabled()) { 1425 Logging.debug("SAX parsing done in {0}", getDurationString(System.currentTimeMillis() - start)); 1426 } 1401 XmlUtils.parseSafeSAX(is, dh); 1427 1402 } 1428 1403 -
trunk/src/org/openstreetmap/josm/tools/XmlObjectParser.java
r13715 r13901 245 245 private Iterable<Object> start(final Reader in, final ContentHandler contentHandler) throws SAXException, IOException { 246 246 try { 247 XMLReader reader = Utils.newSafeSAXParser().getXMLReader();247 XMLReader reader = XmlUtils.newSafeSAXParser().getXMLReader(); 248 248 reader.setContentHandler(contentHandler); 249 249 try { … … 285 285 */ 286 286 public Iterable<Object> startWithValidation(final Reader in, String namespace, String schemaSource) throws SAXException { 287 SchemaFactory factory = Utils.newXmlSchemaFactory();287 SchemaFactory factory = XmlUtils.newXmlSchemaFactory(); 288 288 try (CachedFile cf = new CachedFile(schemaSource); InputStream mis = cf.getInputStream()) { 289 289 Schema schema = factory.newSchema(new StreamSource(mis)); -
trunk/src/org/openstreetmap/josm/tools/bugreport/BugReportSender.java
r12869 r13901 22 22 import org.openstreetmap.josm.tools.OpenBrowser; 23 23 import org.openstreetmap.josm.tools.Utils; 24 import org.openstreetmap.josm.tools.XmlUtils; 24 25 import org.w3c.dom.Document; 25 26 import org.xml.sax.SAXException; … … 127 128 128 129 try (InputStream in = connection.getContent()) { 129 return retrieveDebugToken( Utils.parseSafeDOM(in));130 return retrieveDebugToken(XmlUtils.parseSafeDOM(in)); 130 131 } 131 132 } catch (IOException | SAXException | ParserConfigurationException | XPathExpressionException t) {
Note:
See TracChangeset
for help on using the changeset viewer.