How do I suppress dagger warnings about qualifiers on non-Inject parameters with auto-factory?

63 views
Skip to first unread message

Ben Tatham

unread,
Mar 5, 2018, 1:15:42 PM3/5/18
to Dagger Discuss

(cross posted from stack overflow)


When using auto-factory with dagger, I get warnings during compile when I have qualifiers on a constructor with @Provided on the @AutoFactory constructor.


For example, this gives a warning during compile (or more specifically process annotations):

@AutoFactory
public class Foo {
  Foo(@Provided @Named("bar") bar, SomeThing someThing) {
     ...
  }
  ...
}


warning: Dagger will ignore qualifier annotations on parameters that are not @Inject constructor parameters or @Provides method parameters

Is there a way to suppress this warning so as not to alarm developers who do not necessarily know about auto-factory/dagger very much?

Reply all
Reply to author
Forward
0 new messages