Skip to content
This repository has been archived by the owner on Aug 26, 2021. It is now read-only.

Warning when using qualifier annotations with AutoFactory #419

Open
cypressious opened this issue Jun 25, 2014 · 4 comments
Open

Warning when using qualifier annotations with AutoFactory #419

cypressious opened this issue Jun 25, 2014 · 4 comments

Comments

@cypressious
Copy link

When using AutoFactory with qualifier annotations like this

@AutoFactory
public class MyClass {
    public MyClass(int param, @Provided @QualifierA Object param2) {
    }
}

Dagger will issue the following warning:

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

This is a kind of useless because in this case, the generated factory class will use the annotation correctly. Also there is no way to hide the warning (unless there is one, in which case please tell me).

@cgruber
Copy link
Collaborator

cgruber commented Jun 25, 2014

Hmm. There should be a @SuppressWarning on that.

On 25 June 2014 06:55, cypressious notifications@github.com wrote:

When using AutoFactory with qualifier annotations like this

@AutoFactorypublic class MyClass {
public MyClass(int param, @provided @QualifierA Object param2) {
}}

Dagger will issue the following warning:

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

This is a kind of useless because in this case, the generated factory
class will use the annotation correctly. Also there is no way to hide the
warning (unless there is one, in which case please tell me).


Reply to this email directly or view it on GitHub
#419.

@cypressious
Copy link
Author

At least Eclipse didn't offer one. What's the parameter?

@cgruber
Copy link
Collaborator

cgruber commented Jun 25, 2014

Eclipse might not know about it - it might not exist, but even if it did,
if it's in the annotation processor, there's no information for eclipse to
access to know about it. I'll dig in. What I will say is that if we
preserve this warning in Dagger 2, there for sure will be a suppression
option.

On 25 June 2014 10:41, cypressious notifications@github.com wrote:

At least Eclipse didn't offer one. What's the parameter?


Reply to this email directly or view it on GitHub
#419 (comment).

@cypressious
Copy link
Author

Nice, thank you.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants