fmgasparino / google-gin

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

[ERROR] No @Inject or default constructor found for classes that have default constructor #27

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Try to bind a class that has two constructors, one of them a default 
constructor. Example:

public class ViewImpl implements View {

       private String hello;

       public ViewImpl() {

       }

       public ViewImpl(String hello) {
               this.hello = hello;
       }

       public void sayHello() {
               GWT.log("Hello from view with constructor." + hello, null);
       }
}

2. Fails to start with the following error: [ERROR] No @Inject or default 
constructor found

What is the expected output? What do you see instead?
It should just use the no argument constructor.

What version of the product are you using? On what operating system?
svn 84.

Please provide any additional information below.

As noted here: http://groups.google.com/group/google-
gin/browse_thread/thread/98698d20502a5c31, after the Guice documentation was 
updated, 
this is not the default behavior.

Original issue reported on code.google.com by arthur.k...@gmail.com on 3 Feb 2009 at 1:41

GoogleCodeExporter commented 9 years ago

Original comment by aragos on 4 Feb 2009 at 9:23

GoogleCodeExporter commented 9 years ago
Submitted patch for review: http://codereview.appspot.com/14052

Original comment by aragos on 5 Feb 2009 at 12:03

GoogleCodeExporter commented 9 years ago
Fixed in r86.

Original comment by aragos on 5 Feb 2009 at 12:09

GoogleCodeExporter commented 9 years ago
Great! I'll take a look at it tomorrow.

Original comment by arthur.k...@gmail.com on 5 Feb 2009 at 1:01