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

Invalid diagnostic on a field in a managed bean #534

Closed
1 of 4 tasks
turkeylurkey opened this issue Nov 6, 2024 · 0 comments · Fixed by #535
Closed
1 of 4 tasks

Invalid diagnostic on a field in a managed bean #534

turkeylurkey opened this issue Nov 6, 2024 · 0 comments · Fixed by #535
Assignees
Labels
bug Something isn't working

Comments

@turkeylurkey
Copy link
Contributor

Description:

The fix for issue #444 introduced a new diagnostic but this behaviour is not required by the spec.
image

Specification:

The specification states:

If a managed bean has a non-static public field, it [the managed bean] must have scope @Dependent. If a managed bean with a non-static public field declares any scope other than @Dependent, the container automatically detects the problem and treats it as a definition error.

We should not generate a diagnostic for a field with a scope declaration. The second sentence in the quote above is not a separate rule, it specifies the container behaviour when the rule of the first sentence is broken.

Type of language feature proposed:

Select all that apply

  • diagnostic
  • quick-fix
  • snippet
  • other, please specify:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant