fmgasparino / google-gin

Automatically exported from code.google.com/p/google-gin
Apache License 2.0
0 stars 0 forks source link

Inject the Ginjector fails with static field inject #60

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a class MyClass with a static field for MyInjector annotate it
with @Inject
2. in the Module.configure() method call requestStaticInjection for
annotated MyClass

What is the expected output? What do you see instead?
Expected: No error.
Instead: Gin will fail with CreationException "No implementation for
MyInjector" was bound.

What version of the product are you using? On what operating system?
Gin rev #117

Please provide any additional information below.
Related to Issue #28

Tried using a provider for MyInjector in the module, but this caused a
stack overflow.

Original issue reported on code.google.com by l.brueni...@googlemail.com on 8 Oct 2009 at 8:14

GoogleCodeExporter commented 9 years ago
Hm, this must have slipped my attention. I'll look into it but probably won't 
get
around to this before next week.

Original comment by aragos on 2 Nov 2009 at 7:07

GoogleCodeExporter commented 9 years ago
Patch submitted for review: http://codereview.appspot.com/152045

Original comment by aragos on 10 Nov 2009 at 9:10

GoogleCodeExporter commented 9 years ago
This patch resolves a related issue as well:  static injection of Messages 
subinterfaces 
fails.

An apparent workaround for this:  perform an ignored, non-static injection of 
the 
Messages, Ginjector, etc. into an existing object.

Original comment by awi...@google.com on 22 Dec 2009 at 5:28

GoogleCodeExporter commented 9 years ago
Submitted in r130.

Original comment by aragos on 7 Jan 2010 at 4:26