Thanks of noticing this, Guido. The change was introduced in https://github.com/akka/akka/pull/20488 due to a fix of a bug that we have not dared to touch for 1 year just because there is a risk of such regression. There are incredibly many ways you can write such a Creator and we obviously didn't have test coverage for your way. I will investigate it and report back.
Regards, Patrik On Tue, May 17, 2016 at 9:50 AM, Guido Medina <[email protected]> wrote: > I didn't pasted the code because I wasn't sure it was a known issue: > > // Inside an actor supervisor: > > static final class PriceProcessorCreator implements > Creator<AbstractProcessor> { > > final StrategySupervisor supervisor; > > protected PriceProcessorCreator(StrategySupervisor supervisor) { > this.supervisor = supervisor; > } > > @Override > public AbstractProcessor create() { > return new PriceProcessor(supervisor); > } > } > > // Inside the supervisor constructor: > final PriceProcessorCreator priceProcessorCreator = new > PriceProcessorCreator(this); > registerWorkers(PRICE_WORKER, IntStream.range(0, CONCURRENCY_LEVEL). > mapToObj(i -> > context().actorOf(Props.create(priceProcessorCreator).withMailbox("bounded-mailbox-" > + 2048 / CONCURRENCY_LEVEL))). > collect(toCollection(() -> new > ObjectArrayList<>(CONCURRENCY_LEVEL)))); > > > > On Tuesday, May 17, 2016 at 8:44:03 AM UTC+1, Konrad Malawski wrote: >> >> When talking about "that code does not work", please paste the code under >> discussion. >> >> On Tue, May 17, 2016 at 9:39 AM, Guido Medina <[email protected]> wrote: >> >>> My creators are not working with Akka 2.4.5, they have been working up >>> to now, >>> My actor creators are either static classes or standard classes but the >>> methods that use the creator are not static: >>> >>> 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.AbstractProps$class.checkCreatorClosingOver(AbstractProps.scala:112) >>> ~[akka-actor_2.11-2.4.5.jar:?] >>> at akka.actor.AbstractProps$class.create(AbstractProps.scala:44) >>> ~[akka-actor_2.11-2.4.5.jar:?] >>> at akka.actor.Props$.create(Props.scala:22) >>> ~[akka-actor_2.11-2.4.5.jar:?] >>> at akka.actor.Props.create(Props.scala) ~[akka-actor_2.11-2.4.5.jar:?] >>> >>> Not good news IMHO. >>> >>> Regards, >>> >>> Guido. >>> >>> -- >>> >>>>>>>>>> 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 https://groups.google.com/group/akka-user. >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> >> >> -- >> Cheers, >> Konrad 'ktoso' Malawski >> Akka <http://akka.io/> @ Lightbend <http://lightbend.com/> >> > -- > >>>>>>>>>> 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 https://groups.google.com/group/akka-user. > For more options, visit https://groups.google.com/d/optout. > -- Patrik Nordwall Akka Tech Lead Lightbend <http://www.lightbend.com/> - Reactive apps on the JVM Twitter: @patriknw -- >>>>>>>>>> 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 https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
