vaadin / quarkus

An extension to Quarkus to support Vaadin Flow
Apache License 2.0
28 stars 3 forks source link

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

Open czp13 opened 1 year ago

czp13 commented 1 year ago

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=IFEXISTS, 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 commented 1 year ago

This issue is may retriggered with this change: