Re: Guice#bindMembers() and listeners initialized by the class itself cause NPEs

2017-11-29 Thread Evgeny Chesnokov
Thanks, stl! First of all I would not inject a model. Model classes are not meant to be > handled with DI. > Could you please elaborate this point of view a little further? > Second you can use assisted injection to use constructor injection if you > have both parameters and dependencies in

Re: Guice#bindMembers() and listeners initialized by the class itself cause NPEs

2017-11-28 Thread Stephan Classen
First of all I would not inject a model. Model classes are not meant to be handled with DI. Second you can use assisted injection to use constructor injection if you have both parameters and dependencies in a constructor. Non of the above helps clarify you question. But maybe it helps you

Guice#bindMembers() and listeners initialized by the class itself cause NPEs

2017-11-28 Thread Evgeny Chesnokov
Hi all! I'm having a problem with Guice injection in one particular corner-case. I use Guice to inject model to the controller instances that are parameterized in the constructor, hence I'm using #bindMembers() and not the constructor injection. It seems that if a model callback field in the