Skip to content

Commit 471170a

Browse files
committed
Call reset on reusable SAXParser instance
1 parent e2b3913 commit 471170a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

shared/src/main/scala/scala/xml/factory/XMLLoader.scala

+5-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,11 @@ trait XMLLoader[T <: Node] {
4545
}
4646

4747
/* Override this to use a different SAXParser. */
48-
def parser: SAXParser = parserInstance.get
48+
def parser: SAXParser = {
49+
val p = parserInstance.get
50+
p.reset()
51+
p
52+
}
4953

5054
/* Override this to use a different XMLReader. */
5155
def reader: XMLReader = parser.getXMLReader

0 commit comments

Comments
 (0)