summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/library/scala/xml/Utility.scala8
-rw-r--r--test/files/jvm/xml05.check11
-rw-r--r--test/files/jvm/xml05.scala7
3 files changed, 4 insertions, 22 deletions
diff --git a/src/library/scala/xml/Utility.scala b/src/library/scala/xml/Utility.scala
index 9f230a7866..4d6712419c 100644
--- a/src/library/scala/xml/Utility.scala
+++ b/src/library/scala/xml/Utility.scala
@@ -364,14 +364,14 @@ object Utility extends AnyRef with parsing.TokenTests {
c = it.next
}
val ref = rfb.toString()
- rfb.clear()
+ rfb.setLength(0)
unescape(ref,sb) match {
case null =>
- if (sb.length > 0) { // flush buffer
+ if (sb.length > 0) { // flush buffer
nb += Text(sb.toString())
- sb.clear()
+ sb.setLength(0)
}
- nb += EntityRef(ref) // add entityref
+ nb += EntityRef(sb.toString()) // add entityref
case _ =>
}
}
diff --git a/test/files/jvm/xml05.check b/test/files/jvm/xml05.check
deleted file mode 100644
index 21db1e7ef5..0000000000
--- a/test/files/jvm/xml05.check
+++ /dev/null
@@ -1,11 +0,0 @@
-Type in expressions to have them evaluated.
-Type :help for more information.
-
-scala>
-
-scala> <city name="San Jos&eacute;"/>
-res0: scala.xml.Elem = <city name="San Jos&eacute;"></city>
-
-scala>
-
-scala>
diff --git a/test/files/jvm/xml05.scala b/test/files/jvm/xml05.scala
deleted file mode 100644
index 52ae255393..0000000000
--- a/test/files/jvm/xml05.scala
+++ /dev/null
@@ -1,7 +0,0 @@
-import scala.tools.partest.ReplTest
-
-object Test extends ReplTest {
- def code = """
-<city name="San Jos&eacute;"/>
- """
-} \ No newline at end of file