Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Depedency Injection: Diagnostic for @Inject final fields #167

Closed
3 tasks
Tracked by #16
KidoVin01 opened this issue Sep 28, 2021 · 5 comments
Closed
3 tasks
Tracked by #16

Depedency Injection: Diagnostic for @Inject final fields #167

KidoVin01 opened this issue Sep 28, 2021 · 5 comments
Assignees
Labels
diagnostic Diagnostic item

Comments

@KidoVin01
Copy link
Contributor

KidoVin01 commented Sep 28, 2021

Depednency Injection Spec

Unchecked Errors:

  • When a field is annotated with @Inject, it cannot be final

Potential Solution:

  • Suggest removing final
  • Suggest removing annotation

Related to #153

@KidoVin01 KidoVin01 changed the title Add support for final field/method injection Add support for Final field/method injection Sep 28, 2021
@KidoVin01 KidoVin01 changed the title Add support for Final field/method injection Add support for final fields Sep 28, 2021
@kathrynkodama
Copy link
Contributor

Is this for @Inject? Also clarify that this is for dependency injection

Other CDI issues that mention @Inject for reference:
#104
#102
#134

@KidoVin01
Copy link
Contributor Author

Sorry for the typo, it is for @Inject, I have edited accordingly.

I am not sure how you would like me to clarify it.

@kathrynkodama
Copy link
Contributor

kathrynkodama commented Sep 30, 2021

I am not sure how you would like me to clarify it.

Include in the title which spec this is for, ie. Dependency Injection: diagnostic for @Inject with final fields

@KidoVin01 KidoVin01 changed the title Add support for final fields Depedency Injection: Diagnostic for @Inject final fields Oct 1, 2021
@KidoVin01 KidoVin01 changed the title Depedency Injection: Diagnostic for @Inject final fields Depedency Injection: Diagnostic for @Inject final fields Oct 1, 2021
@himanshuc71
Copy link
Contributor

Taking this on.

kathrynkodama pushed a commit that referenced this issue Oct 26, 2021
…e field (non final) (#167) (#175)

* Added DiagnosticCollector for Dependency Injection

* Added Inject final field conflict quick fix

Remove Inject quick fix

* Added removing modifier quickfix

* Added javadoc comment for DI diagnostics collector

* Added entity type in RemoveModifierQuickFix message

* formatting/identation fixes

* removed unnecessary Apache 2.0 comment
@kathrynkodama
Copy link
Contributor

Closed with #175. Follow-up issue for integration tests will be opened cc: @himanshuc71

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
diagnostic Diagnostic item
Projects
None yet
Development

No branches or pull requests

3 participants