We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 63a8d4f + bc946c4 commit 9ebce70Copy full SHA for 9ebce70
svg-core/src/main/java/com/kitfox/svg/SVGUniverse.java
@@ -577,15 +577,17 @@ public URI getStreamBuiltURI(String name)
577
}
578
579
580
- static SAXParser saxParser;
581
-
+ static ThreadLocal<SAXParser> threadSAXParser = new ThreadLocal<SAXParser>();
+
582
private XMLReader getXMLReader() throws SAXException, ParserConfigurationException
583
{
584
+ SAXParser saxParser = threadSAXParser.get();
585
if (saxParser == null)
586
587
SAXParserFactory saxParserFactory = SAXParserFactory.newInstance();
588
saxParserFactory.setNamespaceAware(true);
589
saxParser = saxParserFactory.newSAXParser();
590
+ threadSAXParser.set(saxParser);
591
592
return saxParser.getXMLReader();
593
0 commit comments