summaryrefslogtreecommitdiff
path: root/src/library/scala/concurrent/impl
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-09-26 11:34:38 -0700
committerPaul Phillips <paulp@improving.org>2012-09-26 11:37:20 -0700
commit742cb71ec8c8205af032df609088affc12d3e1c5 (patch)
tree5de7ebbb7eec4a3678c94ed68026fb4003989f71 /src/library/scala/concurrent/impl
parentb716261a7b29bcf613cb4e3b47ca2fb5a97380bb (diff)
downloadscala-742cb71ec8c8205af032df609088affc12d3e1c5.tar.gz
scala-742cb71ec8c8205af032df609088affc12d3e1c5.tar.bz2
scala-742cb71ec8c8205af032df609088affc12d3e1c5.zip
Don't write side-effecting nullary methods.
Style says never write methods like this: def foo: Unit If it is Unit, then it is side-effecting, and should be def foo(): Unit Since -Xlint warns about this, we must adhere to its dictate.
Diffstat (limited to 'src/library/scala/concurrent/impl')
-rw-r--r--src/library/scala/concurrent/impl/Promise.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/library/scala/concurrent/impl/Promise.scala b/src/library/scala/concurrent/impl/Promise.scala
index a1a3305db0..ff268d850c 100644
--- a/src/library/scala/concurrent/impl/Promise.scala
+++ b/src/library/scala/concurrent/impl/Promise.scala
@@ -107,7 +107,7 @@ private[concurrent] object Promise {
case _ => None
}
- override def isCompleted(): Boolean = getState match { // Cheaper than boxing result into Option due to "def value"
+ override def isCompleted: Boolean = getState match { // Cheaper than boxing result into Option due to "def value"
case _: Try[_] => true
case _ => false
}
@@ -156,7 +156,7 @@ private[concurrent] object Promise {
val value = Some(resolveTry(suppliedValue))
- override def isCompleted(): Boolean = true
+ override def isCompleted: Boolean = true
def tryComplete(value: Try[T]): Boolean = false