#3018 - Enabling -Xlint and dealing with the situation that occurs
This commit is contained in:
parent
88f7e28c6b
commit
c883705242
75 changed files with 249 additions and 275 deletions
|
|
@ -204,7 +204,7 @@ class CounterService extends Actor {
|
|||
if (backlog.size >= MaxBacklog)
|
||||
throw new ServiceUnavailable(
|
||||
"CounterService not available, lack of initial value")
|
||||
backlog = backlog :+ (sender, msg)
|
||||
backlog :+= (sender -> msg)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import language.postfixOps
|
|||
import akka.util.Timeout
|
||||
|
||||
object Introduction {
|
||||
def foo = {
|
||||
def foo(): Unit = {
|
||||
//#Consumer-mina
|
||||
import akka.camel.{ CamelMessage, Consumer }
|
||||
|
||||
|
|
@ -27,7 +27,7 @@ object Introduction {
|
|||
val mina = system.actorOf(Props[MyEndpoint])
|
||||
//#Consumer-mina
|
||||
}
|
||||
def bar = {
|
||||
def bar(): Unit = {
|
||||
//#Consumer
|
||||
import akka.camel.{ CamelMessage, Consumer }
|
||||
|
||||
|
|
@ -41,7 +41,7 @@ object Introduction {
|
|||
}
|
||||
//#Consumer
|
||||
}
|
||||
def baz = {
|
||||
def baz(): Unit = {
|
||||
//#Producer
|
||||
import akka.actor.Actor
|
||||
import akka.camel.{ Producer, Oneway }
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ class DataflowDocSpec extends WordSpec with MustMatchers {
|
|||
val v1, v2 = Promise[Int]()
|
||||
flow {
|
||||
// v1 will become the value of v2 + 10 when v2 gets a value
|
||||
v1 << v2() + 10
|
||||
v1 << 10 + v2()
|
||||
v1() + v2()
|
||||
} onComplete println
|
||||
flow { v2 << 5 } // As you can see, no blocking above!
|
||||
|
|
|
|||
|
|
@ -340,12 +340,12 @@ class FutureDocSpec extends AkkaSpec {
|
|||
def loadPage(s: String) = s
|
||||
val url = "foo bar"
|
||||
def log(cause: Throwable) = ()
|
||||
def watchSomeTV = ()
|
||||
def watchSomeTV(): Unit = ()
|
||||
//#and-then
|
||||
val result = Future { loadPage(url) } andThen {
|
||||
case Failure(exception) ⇒ log(exception)
|
||||
} andThen {
|
||||
case _ ⇒ watchSomeTV
|
||||
case _ ⇒ watchSomeTV()
|
||||
}
|
||||
result foreach println
|
||||
//#and-then
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ object RouterViaProgramDocSpec {
|
|||
|
||||
class ExampleActor1 extends Actor {
|
||||
def receive = {
|
||||
case m @ Message1(nbr) ⇒ sender ! (self, m)
|
||||
case m @ Message1(nbr) ⇒ sender ! ((self, m))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -186,7 +186,7 @@ class TestkitDocSpec extends AkkaSpec with DefaultTimeout with ImplicitSender {
|
|||
val probe1 = TestProbe()
|
||||
val probe2 = TestProbe()
|
||||
val actor = system.actorOf(Props[MyDoubleEcho])
|
||||
actor ! (probe1.ref, probe2.ref)
|
||||
actor ! ((probe1.ref, probe2.ref))
|
||||
actor ! "hello"
|
||||
probe1.expectMsg(500 millis, "hello")
|
||||
probe2.expectMsg(500 millis, "hello")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue