Merge pull request #1490 from akka/wip-3377-Props.create-∂π
improve safety of Props.create by allowing Creator<T>, see #3377
This commit is contained in:
commit
9c89f170d2
11 changed files with 222 additions and 45 deletions
|
|
@ -243,19 +243,19 @@ class ActorDocSpec extends AkkaSpec(Map("akka.loglevel" -> "INFO")) {
|
|||
//#creating-props
|
||||
|
||||
//#creating-props-deprecated
|
||||
// DEPRECATED: encourages to close over enclosing class
|
||||
// DEPRECATED: old case class signature
|
||||
val props4 = Props(
|
||||
creator = { () ⇒ new MyActor },
|
||||
dispatcher = "my-dispatcher")
|
||||
|
||||
// DEPRECATED: encourages to close over enclosing class
|
||||
// DEPRECATED due to duplicate functionality with Props.apply()
|
||||
val props5 = props1.withCreator(new MyActor)
|
||||
|
||||
// DEPRECATED: encourages to close over enclosing class
|
||||
val props6 = Props(new MyActor)
|
||||
|
||||
// DEPRECATED due to duplicate functionality with Props.apply()
|
||||
val props7 = props1.withCreator(classOf[MyActor])
|
||||
val props6 = props1.withCreator(classOf[MyActor])
|
||||
|
||||
// NOT RECOMMENDED: encourages to close over enclosing class
|
||||
val props7 = Props(new MyActor)
|
||||
//#creating-props-deprecated
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue