summaryrefslogtreecommitdiff
path: root/src/library
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2009-11-20 18:59:30 +0000
committerPaul Phillips <paulp@improving.org>2009-11-20 18:59:30 +0000
commite10d77e1ab3df39dc4a3e36399cb8f477ca5a90c (patch)
tree9ca3a1d3a857982bf411f659c9af696580b9971b /src/library
parentb59bb7d36cc6125938b9bbeddff8da4e0efd68fa (diff)
downloadscala-e10d77e1ab3df39dc4a3e36399cb8f477ca5a90c.tar.gz
scala-e10d77e1ab3df39dc4a3e36399cb8f477ca5a90c.tar.bz2
scala-e10d77e1ab3df39dc4a3e36399cb8f477ca5a90c.zip
More deprecation avoidance and some minor smoot...
More deprecation avoidance and some minor smoothings.
Diffstat (limited to 'src/library')
-rw-r--r--src/library/scala/collection/mutable/PriorityQueue.scala2
-rw-r--r--src/library/scala/io/UTF8Codec.scala2
-rw-r--r--src/library/scala/runtime/RichException.scala11
-rw-r--r--src/library/scala/xml/TopScope.scala2
4 files changed, 4 insertions, 13 deletions
diff --git a/src/library/scala/collection/mutable/PriorityQueue.scala b/src/library/scala/collection/mutable/PriorityQueue.scala
index aea7f3a567..d6b5d12749 100644
--- a/src/library/scala/collection/mutable/PriorityQueue.scala
+++ b/src/library/scala/collection/mutable/PriorityQueue.scala
@@ -142,7 +142,7 @@ class PriorityQueue[A](implicit ord: Ordering[A])
*
* @param iter an iterable object
*/
- override def ++(elems: scala.collection.Traversable[A]) = { this.clone() ++= elems } // ??? XXX why does this "override nothing" with override?
+ override def ++(elems: scala.collection.Traversable[A]) = { this.clone() ++= elems }
/** Adds all elements provided by an iterator into the priority queue.
*
diff --git a/src/library/scala/io/UTF8Codec.scala b/src/library/scala/io/UTF8Codec.scala
index 4fac5bca47..ec328700cc 100644
--- a/src/library/scala/io/UTF8Codec.scala
+++ b/src/library/scala/io/UTF8Codec.scala
@@ -17,7 +17,7 @@ package scala.io
object UTF8Codec
{
final val UNI_REPLACEMENT_CHAR: Int = 0x0000FFFD
- final val UNI_REPLACEMENT_BYTES = encode(UNI_REPLACEMENT_CHAR)
+ final val UNI_REPLACEMENT_BYTES = Array[Byte](-17, -65, -67)
// Note, from http://unicode.org/faq/utf_bom.html#utf8-5
//
diff --git a/src/library/scala/runtime/RichException.scala b/src/library/scala/runtime/RichException.scala
index 27b3c719c6..6bb5d9e627 100644
--- a/src/library/scala/runtime/RichException.scala
+++ b/src/library/scala/runtime/RichException.scala
@@ -14,14 +14,5 @@ package scala.runtime
import compat.Platform.EOL
final class RichException(exc: Throwable) {
-
- def getStackTraceString: String = {
- val s = new StringBuilder()
- for (trElem <- exc.getStackTrace()) {
- s.append(trElem.toString())
- s.append(EOL)
- }
- s.toString()
- }
-
+ def getStackTraceString = exc.getStackTrace().mkString("", EOL, EOL)
}
diff --git a/src/library/scala/xml/TopScope.scala b/src/library/scala/xml/TopScope.scala
index 41a1678a50..e0309757fb 100644
--- a/src/library/scala/xml/TopScope.scala
+++ b/src/library/scala/xml/TopScope.scala
@@ -16,7 +16,7 @@ import collection.mutable.StringBuilder
* for the &quot;xml&quot; prefix which is bound to
* &quot;http://www.w3.org/XML/1998/namespace&quot;
*/
-case object TopScope extends NamespaceBinding(null, null, null)
+object TopScope extends NamespaceBinding(null, null, null)
{
import XML.{ xml, namespace }