ning/killbill — comment on commit 848d61f2efa2e158c7f1a43ec6dee89617700416
File: entitlement/src/main/java/com/ning/billing/entitlement/api/user/Subscription.java line 101
By sbrossie:

I understand what static means, and as i said earlier i agree InjectorMagic is not the best part of the code, and we agreed yesterday to remove it. Point taken, let's move on.

That being said, your remark about state between threads does not apply when the static variable you keep is a singleton because by definition there is only one instance of a singleton and whether that instance is obtained through guice or obtained through a static variable i believe that leads to the same thing.

Regarding the tests you are absolutely right this is indeed difficult, and i am already dealing with that in my tests. But since i am removing the 'evil InjectorMagic' no need to purse there.