Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 471170a

Browse files
committedNov 11, 2024·
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

Lines changed: 5 additions & 1 deletion
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)
Please sign in to comment.