Mergin in the latest master

This commit is contained in:
Viktor Klang 2012-06-20 11:28:40 +02:00
commit 1711934043
83 changed files with 2846 additions and 1027 deletions

View file

@ -188,5 +188,10 @@ case class Props(
* able to optimize serialization.
*/
private[akka] case class FromClassCreator(clazz: Class[_ <: Actor]) extends Function0[Actor] {
def apply(): Actor = clazz.newInstance
def apply(): Actor = try clazz.newInstance catch {
case iae: IllegalAccessException
val ctor = clazz.getDeclaredConstructor()
ctor.setAccessible(true)
ctor.newInstance()
}
}