Skip to content

Commit 9ff1348

Browse files
authored
Merge pull request scala#789 from lrytz/reset-safe
catch UnsupportedOperationException in sax parser reset
2 parents f3340be + ec4064a commit 9ff1348

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ trait XMLLoader[T <: Node] {
4747
/* Override this to use a different SAXParser. */
4848
def parser: SAXParser = {
4949
val p = parserInstance.get
50-
p.reset()
50+
try { p.reset() } catch { case _: UnsupportedOperationException => }
5151
p
5252
}
5353

0 commit comments

Comments
 (0)