summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2009-11-18 00:36:26 +0000
committerPaul Phillips <paulp@improving.org>2009-11-18 00:36:26 +0000
commit2edbf55c114c0eed66b8bbb05e56ef6b262aa62b (patch)
tree03c81ee43dcc019d84ca9d9cd2a513e2dfc64aaf
parentac3931a11d681a35fd4b96717aabe1258067edfc (diff)
downloadscala-2edbf55c114c0eed66b8bbb05e56ef6b262aa62b.tar.gz
scala-2edbf55c114c0eed66b8bbb05e56ef6b262aa62b.tar.bz2
scala-2edbf55c114c0eed66b8bbb05e56ef6b262aa62b.zip
More minor removals and some cleanups of !!!s a...
More minor removals and some cleanups of !!!s and XXXs.
-rw-r--r--src/library/scala/annotation/experimental.scala19
-rw-r--r--src/library/scala/collection/immutable/List.scala2
-rw-r--r--src/library/scala/concurrent/DelayedLazyVal.scala4
-rw-r--r--src/library/scala/xml/PrettyPrinter.scala15
-rw-r--r--src/library/scala/xml/parsing/ConstructingParser.scala2
5 files changed, 5 insertions, 37 deletions
diff --git a/src/library/scala/annotation/experimental.scala b/src/library/scala/annotation/experimental.scala
deleted file mode 100644
index 43ce631e2d..0000000000
--- a/src/library/scala/annotation/experimental.scala
+++ /dev/null
@@ -1,19 +0,0 @@
-/* __ *\
-** ________ ___ / / ___ Scala API **
-** / __/ __// _ | / / / _ | (c) 2002-2009, LAMP/EPFL **
-** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
-** /____/\___/_/ |_/____/_/ | | **
-** |/ **
-\* */
-package scala.annotation
-
-/** <p>
- * An annotation for experimental features.
- * </p>
- *
- * @since 2.8
- */
-@experimental // and an experiment which may soon be ending
-final class experimental(message: String) extends StaticAnnotation {
- def this() = this("")
-}
diff --git a/src/library/scala/collection/immutable/List.scala b/src/library/scala/collection/immutable/List.scala
index d22865cad4..f1546f1f0f 100644
--- a/src/library/scala/collection/immutable/List.scala
+++ b/src/library/scala/collection/immutable/List.scala
@@ -299,8 +299,6 @@ sealed abstract class List[+A] extends LinearSeq[A]
if (isEmpty) Stream.Empty
else new Stream.Cons(head, tail.toStream)
- // !!! todo: work in patch
-
/** Computes the difference between this list and the given list
* <code>that</code>.
*
diff --git a/src/library/scala/concurrent/DelayedLazyVal.scala b/src/library/scala/concurrent/DelayedLazyVal.scala
index a5d8219a02..4fcf131f5f 100644
--- a/src/library/scala/concurrent/DelayedLazyVal.scala
+++ b/src/library/scala/concurrent/DelayedLazyVal.scala
@@ -10,8 +10,7 @@
package scala.concurrent
-import annotation.experimental
-import ops._
+import ops.future
/** A <code>DelayedLazyVal</code> is a wrapper for lengthy
* computations which have a valid partially computed result.
@@ -27,7 +26,6 @@ import ops._
* @author Paul Phillips
* @version 2.8
*/
-@experimental
class DelayedLazyVal[T](f: () => T, body: => Unit) {
@volatile private[this] var isDone = false
private[this] lazy val complete = f()
diff --git a/src/library/scala/xml/PrettyPrinter.scala b/src/library/scala/xml/PrettyPrinter.scala
index 8b2193fba8..bc9086a91f 100644
--- a/src/library/scala/xml/PrettyPrinter.scala
+++ b/src/library/scala/xml/PrettyPrinter.scala
@@ -84,20 +84,13 @@ class PrettyPrinter(width: Int, step: Int) {
* @param s ...
* @return ...
*/
- protected def makeBox(ind: Int, s: String) = {
- // XXX um...
- if (cur < ind)
- cur == ind
+ protected def makeBox(ind: Int, s: String) =
if (cur + s.length > width) { // fits in this line
- items = Box(ind, s) :: items
+ items ::= Box(ind, s)
cur += s.length
- } else try {
- for (b <- cut(s, ind).iterator) // break it up
- items = b :: items
- } catch {
- case _:BrokenException => makePara(ind, s) // give up, para
}
- }
+ else try cut(s, ind) foreach (items ::= _) // break it up
+ catch { case _: BrokenException => makePara(ind, s) } // give up, para
// dont respect indent in para, but afterwards
protected def makePara(ind: Int, s: String) = {
diff --git a/src/library/scala/xml/parsing/ConstructingParser.scala b/src/library/scala/xml/parsing/ConstructingParser.scala
index 962c629663..2eee8f8f2e 100644
--- a/src/library/scala/xml/parsing/ConstructingParser.scala
+++ b/src/library/scala/xml/parsing/ConstructingParser.scala
@@ -18,8 +18,6 @@ import scala.io.{ Source, Codec }
object ConstructingParser {
def fromFile(inp: File, preserveWS: Boolean) =
- // XXX why does the default implicit not work here when building locker,
- // unless the empty parameter list is supplied?
new ConstructingParser(Source.fromFile(inp)(), preserveWS) initialize
def fromSource(inp: Source, preserveWS: Boolean) =