google-code-export / google-guice

Automatically exported from code.google.com/p/google-guice
Apache License 2.0
2 stars 1 forks source link

Misdocumented ScopeAnnotation #385

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The javadoc for ScopeAnnotation instructs to specify:

 *   {@code @}Target(TYPE)

when, since @Provides, in fact it should be:

 *   {@code @}Target({TYPE, METHOD})

Speaking of that, it's common to find wrongly targeted ScopeAnnotations as
well as BindingAnnotations. Should Guice, maybe, when creating an injector,
issue warnings when it finds incorrect "Targets" or something like that?

Original issue reported on code.google.com by zorze...@gmail.com on 10 Jun 2009 at 4:15

GoogleCodeExporter commented 9 years ago
I'll fix the issue. As far as I know, we already issue warnings on some 
misplaced scoping annotations. If you put a 
scoping annotation on an interface or abstract class, we fail. Or if you put a 
binding annotation on a method or 
constructor. 

Original comment by limpbizkit on 11 Jun 2009 at 6:29

GoogleCodeExporter commented 9 years ago
Fixed by r1012.

Original comment by limpbizkit on 11 Jun 2009 at 6:49