【发布时间】:2018-01-05 21:35:34
【问题描述】:
为什么 Intellij 会给出这个警告,这是什么意思,我怎样才能让它变得更好?
import akka.actor.Props
object Router {
def props(config: Config, addresses: Set[Address]): Props =
Props(classOf[Router], config, addresses)
// "dynamic invocation could be replaced with a constructor invocation"
如果我使用 Props,我会收到不同的警告。
system.actorOf(Props(classOf[Router], config, addresses))
// could be replaced with factory method call
谢谢
【问题讨论】:
标签: scala intellij-idea akka