diff options
author | Paul Phillips <paulp@improving.org> | 2011-10-04 16:51:08 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-10-04 16:51:08 +0000 |
commit | 10938bfc062511bbb19fe697235332e0e303ceab (patch) | |
tree | e1dda3ede7bb7bbcc2d313b34f20846e16261a65 | |
parent | d1a7af8e27227c7625762fe10560e70853f6529a (diff) | |
download | scala-10938bfc062511bbb19fe697235332e0e303ceab.tar.gz scala-10938bfc062511bbb19fe697235332e0e303ceab.tar.bz2 scala-10938bfc062511bbb19fe697235332e0e303ceab.zip |
Revert "Fix for XML entity bug."
Until I have a second to figure out how a checkfile whose contents are
*recorded from running the test case* can fail to match. No review.
-rw-r--r-- | src/library/scala/xml/Utility.scala | 8 | ||||
-rw-r--r-- | test/files/jvm/xml05.check | 11 | ||||
-rw-r--r-- | test/files/jvm/xml05.scala | 7 |
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é"/> -res0: scala.xml.Elem = <city name="San José"></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é"/> - """ -}
\ No newline at end of file |