summaryrefslogtreecommitdiff
path: root/src/library/scala/collection/JavaConversions.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-09-19 13:35:16 +0000
committerPaul Phillips <paulp@improving.org>2011-09-19 13:35:16 +0000
commit5637b22d21ccc1abe70e16e87c1607cd3acb9b3c (patch)
treef62eb05f94bf22d0091f65002e7fc98cdc04e1ae /src/library/scala/collection/JavaConversions.scala
parentf7e038361ae6b1958985a20e30bfa567d6a51b16 (diff)
downloadscala-5637b22d21ccc1abe70e16e87c1607cd3acb9b3c.tar.gz
scala-5637b22d21ccc1abe70e16e87c1607cd3acb9b3c.tar.bz2
scala-5637b22d21ccc1abe70e16e87c1607cd3acb9b3c.zip
Deprecation and convention adherence patrol.
Iterators should have def next(), not def next. Clearing a mutable structure should be done with clear(), not clear. And etc. No review.
Diffstat (limited to 'src/library/scala/collection/JavaConversions.scala')
-rw-r--r--src/library/scala/collection/JavaConversions.scala14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/library/scala/collection/JavaConversions.scala b/src/library/scala/collection/JavaConversions.scala
index fad990e140..f929086062 100644
--- a/src/library/scala/collection/JavaConversions.scala
+++ b/src/library/scala/collection/JavaConversions.scala
@@ -465,8 +465,8 @@ object JavaConversions {
* @return A Scala mutable ConcurrentMap view of the argument.
*/
implicit def asScalaConcurrentMap[A, B](m: juc.ConcurrentMap[A, B]): mutable.ConcurrentMap[A, B] = m match {
- case cmw: ConcurrentMapWrapper[A, B] => cmw.underlying
- case _ => new JConcurrentMapWrapper(m)
+ case cmw: ConcurrentMapWrapper[a, b] => cmw.underlying
+ case _ => new JConcurrentMapWrapper(m)
}
/**
@@ -585,7 +585,7 @@ object JavaConversions {
elems.seq.foreach(ins.add(_))
}
def remove(i: Int) = underlying.remove(i)
- def clear = underlying.clear
+ def clear() = underlying.clear()
def result = this
}
@@ -600,8 +600,8 @@ object JavaConversions {
def remove = prev match {
case Some(e) =>
underlying match {
- case ms: mutable.Set[A] =>
- ms remove e.asInstanceOf[A]
+ case ms: mutable.Set[a] =>
+ ms remove e
prev = None
case _ =>
throw new UnsupportedOperationException("remove")
@@ -682,8 +682,8 @@ object JavaConversions {
prev match {
case Some(k) =>
underlying match {
- case mm: mutable.Map[A, _] =>
- mm remove k.asInstanceOf[A]
+ case mm: mutable.Map[a, _] =>
+ mm remove k
prev = None
case _ =>
throw new UnsupportedOperationException("remove")