AbhishekKS / google-gin

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

Inherited type parameters cause exception #54

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
If 

 * a type is initialized through a ginjector method (and possibly by being
injected elsewhere),
 * this type also contains a type parameter and
 * the type uses that parameter to inject (or parameterize) an object,

then the injection will fail with an error message because Gin is currently
trying to load the type parameter.

An example:

public class Parameterized<S extends CharSequence> {
  @Inject
  public Parameterized(S chars) {}
}

public interface GenericsGinjector extends Ginjector {
  Parameterized<String> getParameterized();
}

Error message: java.lang.ClassNotFoundException: S extends
java.lang.CharSequence

See also:
http://groups.google.com/group/google-gin/browse_thread/thread/fbc9722e169e2843?
hl=en

Original issue reported on code.google.com by aragos on 19 Aug 2009 at 5:50

GoogleCodeExporter commented 9 years ago

Original comment by aragos on 19 Aug 2009 at 10:22

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

Original comment by aragos on 20 Aug 2009 at 12:06

GoogleCodeExporter commented 9 years ago

Original comment by aragos on 27 Aug 2009 at 10:12

GoogleCodeExporter commented 9 years ago
Submitted in r111.

Original comment by aragos on 1 Sep 2009 at 5:34