summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormichelou <michelou@epfl.ch>2008-06-10 09:25:57 +0000
committermichelou <michelou@epfl.ch>2008-06-10 09:25:57 +0000
commitdbfdf0ec6d3ef0017b279dd9a195ce2615f9c3bb (patch)
tree2a85e677fa8febcf1f28f86907813a089d85ac18 /src
parenta4baf28d203959457d82762e27ffbb7104dc0a07 (diff)
downloadscala-dbfdf0ec6d3ef0017b279dd9a195ce2615f9c3bb.tar.gz
scala-dbfdf0ec6d3ef0017b279dd9a195ce2615f9c3bb.tar.bz2
scala-dbfdf0ec6d3ef0017b279dd9a195ce2615f9c3bb.zip
added EOLs, missing headers
Diffstat (limited to 'src')
-rw-r--r--src/dotnet-library/scala/xml/Atom.scala2
-rw-r--r--src/dotnet-library/scala/xml/Comment.scala2
-rw-r--r--src/dotnet-library/scala/xml/Document.scala2
-rw-r--r--src/dotnet-library/scala/xml/Elem.scala2
-rw-r--r--src/dotnet-library/scala/xml/EntityRef.scala2
-rw-r--r--src/dotnet-library/scala/xml/Group.scala2
-rw-r--r--src/dotnet-library/scala/xml/HasKeyValue.scala2
-rw-r--r--src/dotnet-library/scala/xml/MalformedAttributeException.scala2
-rw-r--r--src/dotnet-library/scala/xml/MetaData.scala2
-rw-r--r--src/dotnet-library/scala/xml/NamespaceBinding.scala2
-rw-r--r--src/dotnet-library/scala/xml/Node.scala2
-rw-r--r--src/dotnet-library/scala/xml/NodeBuffer.scala2
-rw-r--r--src/dotnet-library/scala/xml/NodeSeq.scala2
-rw-r--r--src/dotnet-library/scala/xml/NodeTraverser.scala2
-rw-r--r--src/dotnet-library/scala/xml/Null.scala2
-rw-r--r--src/dotnet-library/scala/xml/PCData.scala2
-rw-r--r--src/dotnet-library/scala/xml/Parsing.scala2
-rw-r--r--src/dotnet-library/scala/xml/PrefixedAttribute.scala2
-rw-r--r--src/dotnet-library/scala/xml/PrettyPrinter.scala2
-rw-r--r--src/dotnet-library/scala/xml/ProcInstr.scala2
-rw-r--r--src/dotnet-library/scala/xml/QNode.scala2
-rw-r--r--src/dotnet-library/scala/xml/SpecialNode.scala2
-rw-r--r--src/dotnet-library/scala/xml/Text.scala2
-rw-r--r--src/dotnet-library/scala/xml/TextBuffer.scala2
-rw-r--r--src/dotnet-library/scala/xml/TopScope.scala2
-rw-r--r--src/dotnet-library/scala/xml/TypeSymbol.scala2
-rw-r--r--src/dotnet-library/scala/xml/Unparsed.scala2
-rw-r--r--src/dotnet-library/scala/xml/UnprefixedAttribute.scala2
-rw-r--r--src/dotnet-library/scala/xml/Utility.scala2
-rw-r--r--src/dotnet-library/scala/xml/XML.scala2
-rw-r--r--src/dotnet-library/scala/xml/Xhtml.scala2
-rw-r--r--src/library/scala/collection/RollbackIterator.scala44
-rw-r--r--src/library/scala/collection/Sorted.scala28
-rw-r--r--src/library/scala/mobile/Code.scala11
34 files changed, 84 insertions, 61 deletions
diff --git a/src/dotnet-library/scala/xml/Atom.scala b/src/dotnet-library/scala/xml/Atom.scala
index ff3dd2bf72..cb97d64471 100644
--- a/src/dotnet-library/scala/xml/Atom.scala
+++ b/src/dotnet-library/scala/xml/Atom.scala
@@ -1 +1 @@
-/* Atom.scala does not exist for the dotnet target */ \ No newline at end of file
+/* Atom.scala does not exist for the dotnet target */
diff --git a/src/dotnet-library/scala/xml/Comment.scala b/src/dotnet-library/scala/xml/Comment.scala
index f154d7e399..3fe49c7bf0 100644
--- a/src/dotnet-library/scala/xml/Comment.scala
+++ b/src/dotnet-library/scala/xml/Comment.scala
@@ -1 +1 @@
-/* Comment.scala does not exist for the dotnet target */ \ No newline at end of file
+/* Comment.scala does not exist for the dotnet target */
diff --git a/src/dotnet-library/scala/xml/Document.scala b/src/dotnet-library/scala/xml/Document.scala
index 0e2a693d6f..9a3e44190b 100644
--- a/src/dotnet-library/scala/xml/Document.scala
+++ b/src/dotnet-library/scala/xml/Document.scala
@@ -1 +1 @@
-/* Document.scala does not exist for the dotnet target */ \ No newline at end of file
+/* Document.scala does not exist for the dotnet target */
diff --git a/src/dotnet-library/scala/xml/Elem.scala b/src/dotnet-library/scala/xml/Elem.scala
index 9701daf434..6f51090eb4 100644
--- a/src/dotnet-library/scala/xml/Elem.scala
+++ b/src/dotnet-library/scala/xml/Elem.scala
@@ -1 +1 @@
-/* Elem.scala does not exist for the dotnet target */ \ No newline at end of file
+/* Elem.scala does not exist for the dotnet target */
diff --git a/src/dotnet-library/scala/xml/EntityRef.scala b/src/dotnet-library/scala/xml/EntityRef.scala
index b3c6091d6d..e179fb9ff8 100644
--- a/src/dotnet-library/scala/xml/EntityRef.scala
+++ b/src/dotnet-library/scala/xml/EntityRef.scala
@@ -1 +1 @@
-/* EntityRef.scala does not exist for the dotnet target */ \ No newline at end of file
+/* EntityRef.scala does not exist for the dotnet target */
diff --git a/src/dotnet-library/scala/xml/Group.scala b/src/dotnet-library/scala/xml/Group.scala
index 1942178f7e..3a713746c0 100644
--- a/src/dotnet-library/scala/xml/Group.scala
+++ b/src/dotnet-library/scala/xml/Group.scala
@@ -1 +1 @@
-/* Group.scala does not exist for the dotnet target */ \ No newline at end of file
+/* Group.scala does not exist for the dotnet target */
diff --git a/src/dotnet-library/scala/xml/HasKeyValue.scala b/src/dotnet-library/scala/xml/HasKeyValue.scala
index 5b55cc68b6..31b53bfb7b 100644
--- a/src/dotnet-library/scala/xml/HasKeyValue.scala
+++ b/src/dotnet-library/scala/xml/HasKeyValue.scala
@@ -1 +1 @@
-/* HasKeyValue.scala does not exist for the dotnet target */ \ No newline at end of file
+/* HasKeyValue.scala does not exist for the dotnet target */
diff --git a/src/dotnet-library/scala/xml/MalformedAttributeException.scala b/src/dotnet-library/scala/xml/MalformedAttributeException.scala
index a32d2c8c58..4fea0996da 100644
--- a/src/dotnet-library/scala/xml/MalformedAttributeException.scala
+++ b/src/dotnet-library/scala/xml/MalformedAttributeException.scala
@@ -1 +1 @@
-/* MalformedAttributeException.scala does not exist for the dotnet target */ \ No newline at end of file
+/* MalformedAttributeException.scala does not exist for the dotnet target */
diff --git a/src/dotnet-library/scala/xml/MetaData.scala b/src/dotnet-library/scala/xml/MetaData.scala
index cc022353ef..16ba9b09d5 100644
--- a/src/dotnet-library/scala/xml/MetaData.scala
+++ b/src/dotnet-library/scala/xml/MetaData.scala
@@ -1 +1 @@
-/* MetaData.scala does not exist for the dotnet target */ \ No newline at end of file
+/* MetaData.scala does not exist for the dotnet target */
diff --git a/src/dotnet-library/scala/xml/NamespaceBinding.scala b/src/dotnet-library/scala/xml/NamespaceBinding.scala
index f57d44792d..6fa1309a7a 100644
--- a/src/dotnet-library/scala/xml/NamespaceBinding.scala
+++ b/src/dotnet-library/scala/xml/NamespaceBinding.scala
@@ -1 +1 @@
-/* NamespaceBinding.scala does not exist for the dotnet target */ \ No newline at end of file
+/* NamespaceBinding.scala does not exist for the dotnet target */
diff --git a/src/dotnet-library/scala/xml/Node.scala b/src/dotnet-library/scala/xml/Node.scala
index ae4bd61d89..a4fda43174 100644
--- a/src/dotnet-library/scala/xml/Node.scala
+++ b/src/dotnet-library/scala/xml/Node.scala
@@ -1 +1 @@
-/* Node.scala does not exist for the dotnet target */ \ No newline at end of file
+/* Node.scala does not exist for the dotnet target */
diff --git a/src/dotnet-library/scala/xml/NodeBuffer.scala b/src/dotnet-library/scala/xml/NodeBuffer.scala
index 1f07f09ed4..37bed04b01 100644
--- a/src/dotnet-library/scala/xml/NodeBuffer.scala
+++ b/src/dotnet-library/scala/xml/NodeBuffer.scala
@@ -1 +1 @@
-/* NodeBuffer.scala does not exist for the dotnet target */ \ No newline at end of file
+/* NodeBuffer.scala does not exist for the dotnet target */
diff --git a/src/dotnet-library/scala/xml/NodeSeq.scala b/src/dotnet-library/scala/xml/NodeSeq.scala
index c49e0fa6fc..b7a6371a1c 100644
--- a/src/dotnet-library/scala/xml/NodeSeq.scala
+++ b/src/dotnet-library/scala/xml/NodeSeq.scala
@@ -1 +1 @@
-/* NodeSeq.scala does not exist for the dotnet target */ \ No newline at end of file
+/* NodeSeq.scala does not exist for the dotnet target */
diff --git a/src/dotnet-library/scala/xml/NodeTraverser.scala b/src/dotnet-library/scala/xml/NodeTraverser.scala
index e336444e8a..87aca3a120 100644
--- a/src/dotnet-library/scala/xml/NodeTraverser.scala
+++ b/src/dotnet-library/scala/xml/NodeTraverser.scala
@@ -1 +1 @@
-/* NodeTraverser.scala does not exist for the dotnet target */ \ No newline at end of file
+/* NodeTraverser.scala does not exist for the dotnet target */
diff --git a/src/dotnet-library/scala/xml/Null.scala b/src/dotnet-library/scala/xml/Null.scala
index 0b1b2284cb..42f17eeade 100644
--- a/src/dotnet-library/scala/xml/Null.scala
+++ b/src/dotnet-library/scala/xml/Null.scala
@@ -1 +1 @@
-/* Null.scala does not exist for the dotnet target */ \ No newline at end of file
+/* Null.scala does not exist for the dotnet target */
diff --git a/src/dotnet-library/scala/xml/PCData.scala b/src/dotnet-library/scala/xml/PCData.scala
index 76c12030b3..185b016abc 100644
--- a/src/dotnet-library/scala/xml/PCData.scala
+++ b/src/dotnet-library/scala/xml/PCData.scala
@@ -1 +1 @@
-/* PCData.scala does not exist for the dotnet target */ \ No newline at end of file
+/* PCData.scala does not exist for the dotnet target */
diff --git a/src/dotnet-library/scala/xml/Parsing.scala b/src/dotnet-library/scala/xml/Parsing.scala
index 5190e4d70d..510a535888 100644
--- a/src/dotnet-library/scala/xml/Parsing.scala
+++ b/src/dotnet-library/scala/xml/Parsing.scala
@@ -1 +1 @@
-/* Parsing.scala does not exist for the dotnet target */ \ No newline at end of file
+/* Parsing.scala does not exist for the dotnet target */
diff --git a/src/dotnet-library/scala/xml/PrefixedAttribute.scala b/src/dotnet-library/scala/xml/PrefixedAttribute.scala
index e307499554..a01eee7645 100644
--- a/src/dotnet-library/scala/xml/PrefixedAttribute.scala
+++ b/src/dotnet-library/scala/xml/PrefixedAttribute.scala
@@ -1 +1 @@
-/* PrefixedAttribute.scala does not exist for the dotnet target */ \ No newline at end of file
+/* PrefixedAttribute.scala does not exist for the dotnet target */
diff --git a/src/dotnet-library/scala/xml/PrettyPrinter.scala b/src/dotnet-library/scala/xml/PrettyPrinter.scala
index 10220e826c..c45630bbd8 100644
--- a/src/dotnet-library/scala/xml/PrettyPrinter.scala
+++ b/src/dotnet-library/scala/xml/PrettyPrinter.scala
@@ -1 +1 @@
-/* PrettyPrinter.scala does not exist for the dotnet target */ \ No newline at end of file
+/* PrettyPrinter.scala does not exist for the dotnet target */
diff --git a/src/dotnet-library/scala/xml/ProcInstr.scala b/src/dotnet-library/scala/xml/ProcInstr.scala
index 750265be9b..c3f6874fdf 100644
--- a/src/dotnet-library/scala/xml/ProcInstr.scala
+++ b/src/dotnet-library/scala/xml/ProcInstr.scala
@@ -1 +1 @@
-/* ProcInstr.scala does not exist for the dotnet target */ \ No newline at end of file
+/* ProcInstr.scala does not exist for the dotnet target */
diff --git a/src/dotnet-library/scala/xml/QNode.scala b/src/dotnet-library/scala/xml/QNode.scala
index 9b8089d068..29f02749fd 100644
--- a/src/dotnet-library/scala/xml/QNode.scala
+++ b/src/dotnet-library/scala/xml/QNode.scala
@@ -1 +1 @@
-/* QNode.scala does not exist for the dotnet target */ \ No newline at end of file
+/* QNode.scala does not exist for the dotnet target */
diff --git a/src/dotnet-library/scala/xml/SpecialNode.scala b/src/dotnet-library/scala/xml/SpecialNode.scala
index 909d567da0..857a02fd0e 100644
--- a/src/dotnet-library/scala/xml/SpecialNode.scala
+++ b/src/dotnet-library/scala/xml/SpecialNode.scala
@@ -1 +1 @@
-/* SpecialNode.scala does not exist for the dotnet target */ \ No newline at end of file
+/* SpecialNode.scala does not exist for the dotnet target */
diff --git a/src/dotnet-library/scala/xml/Text.scala b/src/dotnet-library/scala/xml/Text.scala
index 3c87f56741..9b23f64781 100644
--- a/src/dotnet-library/scala/xml/Text.scala
+++ b/src/dotnet-library/scala/xml/Text.scala
@@ -1 +1 @@
-/* Text.scala does not exist for the dotnet target */ \ No newline at end of file
+/* Text.scala does not exist for the dotnet target */
diff --git a/src/dotnet-library/scala/xml/TextBuffer.scala b/src/dotnet-library/scala/xml/TextBuffer.scala
index b382b40807..3a97bc1f6d 100644
--- a/src/dotnet-library/scala/xml/TextBuffer.scala
+++ b/src/dotnet-library/scala/xml/TextBuffer.scala
@@ -1 +1 @@
-/* TextBuffer.scala does not exist for the dotnet target */ \ No newline at end of file
+/* TextBuffer.scala does not exist for the dotnet target */
diff --git a/src/dotnet-library/scala/xml/TopScope.scala b/src/dotnet-library/scala/xml/TopScope.scala
index f8256e76a0..bcc4491eba 100644
--- a/src/dotnet-library/scala/xml/TopScope.scala
+++ b/src/dotnet-library/scala/xml/TopScope.scala
@@ -1 +1 @@
-/* TopScope.scala does not exist for the dotnet target */ \ No newline at end of file
+/* TopScope.scala does not exist for the dotnet target */
diff --git a/src/dotnet-library/scala/xml/TypeSymbol.scala b/src/dotnet-library/scala/xml/TypeSymbol.scala
index 0a6c9469f8..d300f74b92 100644
--- a/src/dotnet-library/scala/xml/TypeSymbol.scala
+++ b/src/dotnet-library/scala/xml/TypeSymbol.scala
@@ -1 +1 @@
-/* TypeSymbol.scala does not exist for the dotnet target */ \ No newline at end of file
+/* TypeSymbol.scala does not exist for the dotnet target */
diff --git a/src/dotnet-library/scala/xml/Unparsed.scala b/src/dotnet-library/scala/xml/Unparsed.scala
index f3d67e0d5c..2a0d68b690 100644
--- a/src/dotnet-library/scala/xml/Unparsed.scala
+++ b/src/dotnet-library/scala/xml/Unparsed.scala
@@ -1 +1 @@
-/* Unparsed.scala does not exist for the dotnet target */ \ No newline at end of file
+/* Unparsed.scala does not exist for the dotnet target */
diff --git a/src/dotnet-library/scala/xml/UnprefixedAttribute.scala b/src/dotnet-library/scala/xml/UnprefixedAttribute.scala
index c8825c6221..bb959f7c5b 100644
--- a/src/dotnet-library/scala/xml/UnprefixedAttribute.scala
+++ b/src/dotnet-library/scala/xml/UnprefixedAttribute.scala
@@ -1 +1 @@
-/* UnprefixedAttribute.scala does not exist for the dotnet target */ \ No newline at end of file
+/* UnprefixedAttribute.scala does not exist for the dotnet target */
diff --git a/src/dotnet-library/scala/xml/Utility.scala b/src/dotnet-library/scala/xml/Utility.scala
index a85d08092f..874a96b58b 100644
--- a/src/dotnet-library/scala/xml/Utility.scala
+++ b/src/dotnet-library/scala/xml/Utility.scala
@@ -1 +1 @@
-/* Utility.scala does not exist for the dotnet target */ \ No newline at end of file
+/* Utility.scala does not exist for the dotnet target */
diff --git a/src/dotnet-library/scala/xml/XML.scala b/src/dotnet-library/scala/xml/XML.scala
index 9a56be7384..4333bf101b 100644
--- a/src/dotnet-library/scala/xml/XML.scala
+++ b/src/dotnet-library/scala/xml/XML.scala
@@ -1 +1 @@
-/* XML.scala does not exist for the dotnet target */ \ No newline at end of file
+/* XML.scala does not exist for the dotnet target */
diff --git a/src/dotnet-library/scala/xml/Xhtml.scala b/src/dotnet-library/scala/xml/Xhtml.scala
index 7e3a2cc360..d55d9b4f8b 100644
--- a/src/dotnet-library/scala/xml/Xhtml.scala
+++ b/src/dotnet-library/scala/xml/Xhtml.scala
@@ -1 +1 @@
-/* Xhtml.scala does not exist for the dotnet target */ \ No newline at end of file
+/* Xhtml.scala does not exist for the dotnet target */
diff --git a/src/library/scala/collection/RollbackIterator.scala b/src/library/scala/collection/RollbackIterator.scala
index 291d72f507..81567aca03 100644
--- a/src/library/scala/collection/RollbackIterator.scala
+++ b/src/library/scala/collection/RollbackIterator.scala
@@ -1,28 +1,43 @@
+/* __ *\
+** ________ ___ / / ___ Scala API **
+** / __/ __// _ | / / / _ | (c) 2007-2008, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
+** /____/\___/_/ |_/____/_/ | | **
+** |/ **
+\* */
+
+// $Id$
+
package scala.collection
+
import scala.collection.mutable.{ArrayBuffer}
/** Rollback iterators are buffered iterators which allow for unbounded rollbacks
*
* @author Sean McDirmid
*/
-class RollbackIterator[+A](underlying : Iterator[A]) extends BufferedIterator.Default[A] {
- private[this] var rollback : ArrayBuffer[A] = null
- protected def fill(sz : Int) : Seq[A] = if (underlying.hasNext) underlying.next :: Nil else Nil
+class RollbackIterator[+A](underlying: Iterator[A]) extends BufferedIterator.Default[A] {
+ private[this] var rollback: ArrayBuffer[A] = null
+ protected def fill(sz: Int): Seq[A] =
+ if (underlying.hasNext) underlying.next :: Nil else Nil
- override def next : A = {
+ override def next: A = {
val ret = super.next
if (rollback != null) rollback += ret
ret
}
- private def initRollback = if (rollback == null) {
- rollback = new ArrayBuffer[A]
- None
- } else Some(rollback.length)
+
+ private def initRollback =
+ if (rollback == null) {
+ rollback = new ArrayBuffer[A]
+ None
+ }
+ else Some(rollback.length)
/** will rollback all elements iterated during
* <code>f</code>'s execution if <code>f</code> return false
*/
- def tryRead[T](f : => Option[T]) : Option[T] = {
+ def tryRead[T](f: => Option[T]): Option[T] = {
val oldLength = initRollback
var g : Option[T] = None
try {
@@ -45,9 +60,9 @@ class RollbackIterator[+A](underlying : Iterator[A]) extends BufferedIterator.De
/** remembers elements iterated over during <code>g</code>'s execution
* and provides these elements to the result of <code>g</code>'s execution
*/
- def remember[T](g : => (Seq[A] => T)) : T = {
+ def remember[T](g: => (Seq[A] => T)): T = {
val oldLength = initRollback
- var in : Seq[A] = Nil
+ var in: Seq[A] = Nil
val f = try {
g
} finally {
@@ -56,14 +71,17 @@ class RollbackIterator[+A](underlying : Iterator[A]) extends BufferedIterator.De
}
f(in)
}
+
/** returns true if any elements are iterated over during <code>f</code>'s execution
*/
- def read(f : => Unit) : Boolean = remember[Boolean]{
+ def read(f: => Unit): Boolean = remember[Boolean] {
f; seq => !seq.isEmpty
}
+
/** if elements of <code>seq</code> will be iterated over next in this iterator,
* returns true and iterates over these elements
*/
override def readIfStartsWith(seq : Seq[Any]) : Boolean =
!tryRead{if (seq.forall(a => hasNext && next == a)) Some(()) else None}.isEmpty
-} \ No newline at end of file
+
+}
diff --git a/src/library/scala/collection/Sorted.scala b/src/library/scala/collection/Sorted.scala
index eda7c21aef..b7ce28d8dd 100644
--- a/src/library/scala/collection/Sorted.scala
+++ b/src/library/scala/collection/Sorted.scala
@@ -1,22 +1,23 @@
/* __ *\
** ________ ___ / / ___ Scala API **
-** / __/ __// _ | / / / _ | (c) 2006-2007, LAMP/EPFL **
-** __\ \/ /__/ __ |/ /__/ __ | **
+** / __/ __// _ | / / / _ | (c) 2006-2008, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
** /____/\___/_/ |_/____/_/ | | **
** |/ **
\* */
// $Id$
-package scala.collection;
+package scala.collection
/** Any collection (including maps) whose keys (or elements) are ordered.
*
* @author Sean McDirmid
*/
trait Sorted[K,+A] extends Ranged[K,A] {
+
/** return as a projection the set of keys in this collection */
- def keySet : SortedSet[K];
+ def keySet: SortedSet[K]
/** Creates a ranged projection of this collection. Any mutations in the
* ranged projection will update this collection and vice versa. Keys
@@ -27,15 +28,18 @@ trait Sorted[K,+A] extends Ranged[K,A] {
* @param until The upper-bound (exclusive) of the ranged projection.
* <code>None</code> if there is no upper bound.
*/
- override def rangeImpl(from: Option[K], until: Option[K]) : Sorted[K,A];
- override def from(from: K) = rangeImpl(Some(from), None);
- override def until(until: K) = rangeImpl(None, Some(until));
- override def range(from: K, until: K) = rangeImpl(Some(from),Some(until));
+ override def rangeImpl(from: Option[K], until: Option[K]): Sorted[K,A]
+
+ override def from(from: K) = rangeImpl(Some(from), None)
+
+ override def until(until: K) = rangeImpl(None, Some(until))
+
+ override def range(from: K, until: K) = rangeImpl(Some(from),Some(until))
/** Create a range projection of this collection with no lower-bound.
* @param to The upper-bound (inclusive) of the ranged projection.
*/
- def to(to : K): Sorted[K,A] = {
+ def to(to: K): Sorted[K,A] = {
// tough!
val i = keySet.from(to).elements;
if (!i.hasNext) return this;
@@ -45,7 +49,8 @@ trait Sorted[K,+A] extends Ranged[K,A] {
else return until(i.next);
} else return until(next);
}
- protected def hasAll(j : Iterator[K]) : Boolean = {
+
+ protected def hasAll(j: Iterator[K]): Boolean = {
val i = keySet.elements;
if (!i.hasNext) return !j.hasNext;
var in = i.next;
@@ -59,6 +64,7 @@ trait Sorted[K,+A] extends Ranged[K,A] {
else true;
}) in = i.next;
}
- return true;
+ true
}
+
}
diff --git a/src/library/scala/mobile/Code.scala b/src/library/scala/mobile/Code.scala
index ba7a5b8fb4..0ff0092b23 100644
--- a/src/library/scala/mobile/Code.scala
+++ b/src/library/scala/mobile/Code.scala
@@ -195,7 +195,7 @@ class Code(clazz: java.lang.Class[_]) {
private def applyFun(methName: String, args: Array[JObject],
argTypes: Array[Class[T] forSome { type T }]): JObject = {
try {
- val method = clazz.getMethod(methName, argTypes: _*)
+ val method = clazz.getMethod(methName, argTypes)
var obj: JObject = null
if (! Modifier.isStatic(method.getModifiers())) {
if (instance eq null) {
@@ -205,7 +205,7 @@ class Code(clazz: java.lang.Class[_]) {
val cs = clazz.getConstructors()
//Console.println("cs.length=" + cs.length);
if (cs.length > 0) {
- cs(0).newInstance(Array(""): _*).asInstanceOf[AnyRef]
+ cs(0).newInstance(Array("")).asInstanceOf[AnyRef]
} else {
error("class " + clazz.getName() + " has no public constructor")
null
@@ -214,15 +214,15 @@ class Code(clazz: java.lang.Class[_]) {
}
obj = instance
}
- val result = method.invoke(obj, args: _*)
+ val result = method.invoke(obj, args)
if (result eq null) ().asInstanceOf[JObject] else result
}
catch {
case me: NoSuchMethodException =>
if (isConstructorName(methName)) {
try {
- val cstr = clazz.getConstructor(argTypes: _*)
- instance = cstr.newInstance(args: _*).asInstanceOf[AnyRef]
+ val cstr = clazz.getConstructor(argTypes)
+ instance = cstr.newInstance(args).asInstanceOf[AnyRef]
instance
}
catch {
@@ -244,4 +244,3 @@ class Code(clazz: java.lang.Class[_]) {
}
}
-