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

Removed (notifyObserver = IF_EXISTS) condition from RouteScopedContext. #102

Open
czp13 opened this issue Mar 9, 2023 · 1 comment
Open

Comments

@czp13
Copy link
Contributor

czp13 commented Mar 9, 2023

Bumping the version from <quarkus.version>3.0.0.Alpha3</quarkus.version> to <quarkus.version>3.0.0.Alpha4</quarkus.version>

This caused us to have this building error:
https://github.com/dependent bean must not have a conditional observer method: void onAfterNavigation(com.vaadin.flow.router.AfterNavigationEvent event)

So we removed the notifiyObserver=IF_EXISTS condition from the RouteScopedContext.
As it is a new requirement from 1.2 CDI stating the following and will cause an error.

Beans with scope @dependent may not have conditional observer methods.
If a bean with scope @dependent has an observer method declared receive=IF_EXISTS,
the container automatically detects the problem and treats it as a definition error.

And on the AfterNavigationEvent there is a @Dependent annotation (default, implicit).

CDI observer on Stackoverflow
CD 1.2 Spec

Ideally, it shall not cause any error, but potentially it can have some side effects we are not aware of.
If anyone experiences some side effects, let us, the Quarkus maintainers, know it, please.

@czp13
Copy link
Contributor Author

czp13 commented Mar 9, 2023

This issue is may retriggered with this change:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🔖 Normal Priority (P2)
Development

No branches or pull requests

1 participant