Comment #2 on issue 676 by [email protected]: singletions recreated many times on error, memebrs injected values may be null
http://code.google.com/p/google-guice/issues/detail?id=676

class Test1
{
   Test1()
   {
       throw new RuntimeException();
   }
}

class Test2
{
   @Inject
   private Test1 member;
}

class Test3
{
   @Inject
   private Test1 member;
}

Just bind all classes as eager singletons.

1) Guice will fail to create Test1 class, but it will create Test2 normally. It should fail creating Test2 cause 'member' is not nullable.

2) Guice will try to create Test1 class twice. First when creating Test2 class and second one when creating Test3 class. It's really annoying that guice will try to create failing singleton 1000 times...

--
You received this message because you are subscribed to the Google Groups 
"google-guice-dev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-guice-dev?hl=en.

Reply via email to