Open GoogleCodeExporter opened 9 years ago
Hi - a testcase for each of the scenarios would be really helpful to
demonstrate the problem and validate the fix.
Original comment by mccu...@gmail.com
on 14 Mar 2012 at 10:51
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...
Original comment by kvas...@gmail.com
on 24 Mar 2012 at 10:57
Please provide a patch in JUnit form, with an assertion on the right behavior,
so that it currently fails.
Original comment by sberlin
on 5 Dec 2013 at 11:52
Here is the testcase using JUnit. It currently fails but with patch applied it
does not.
I wish this fix can make it into 4.0 release - few days ago I had a 10+ MB of
output in log file from an exception thrown by Guice with 900+ messages in it
and that is completely undebuggable.
p.s. there is a minor exception handling problem with the patch but it is
probably easy to handle it properly.
Original comment by mikhail....@gmail.com
on 12 Apr 2014 at 4:01
Attachments:
Can someone from committers take a look at this issue please? It should be
straightforward to address it.
Original comment by mikhail....@gmail.com
on 5 May 2014 at 3:43
Original issue reported on code.google.com by
kvas...@gmail.com
on 25 Dec 2011 at 10:39Attachments: