Hi,
I was trying use the recommended practice of having a creator as part of
the untyped actors to have a compile time validation of the actor
constructors.
However running JUnits against such classes from *Eclipse *is giving me
this error:
java.lang.IllegalArgumentException: cannot use non-static local Creator to
create actors; make it static (e.g. local to a static method) or top-level
at akka.actor.Props$.create(Props.scala:112)
at akka.actor.Props.create(Props.scala)
This doesn't happen when using the command line javac (from Maven) or when
using IntelliJ IDEA.
Since there are many eclipse users in our group, I'd like to check if there
is a way to work around this? Is this some sort of scala eclipse plugin
issue?
Also this seems to happen only when I use the Creator as an inline instance.
This works:
public static Props props( final String param1, final String param2) {
return Props.create( new MyActorCreator( param1, param2) );
}
This fails in eclipse with the error above when running JUnits.
public static Props props( final String param1, final String param2) {
return Props.create( new Creator<MyActor>() {
@Override
public MyActorcreate() throws Exception {
return new MyActor( param1, param2);
}
});
}
Any help would be appreciated.
Cheers,
B
--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ:
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.