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

Quartz - only notify QuartzSchedulerImpl.destroy() if the bean exists #32580

Merged
merged 1 commit into from
Apr 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import jakarta.enterprise.context.BeforeDestroyed;
import jakarta.enterprise.event.Event;
import jakarta.enterprise.event.Observes;
import jakarta.enterprise.event.Reception;
import jakarta.enterprise.inject.Instance;
import jakarta.enterprise.inject.Produces;
import jakarta.enterprise.inject.Typed;
Expand Down Expand Up @@ -466,7 +467,7 @@ void start(@Observes @Priority(Interceptor.Priority.PLATFORM_BEFORE) StartupEven
*
* @param event ignored
*/
void destroy(@Observes @BeforeDestroyed(ApplicationScoped.class) Object event) {
void destroy(@Observes(notifyObserver = Reception.IF_EXISTS) @BeforeDestroyed(ApplicationScoped.class) Object event) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

styling: static import would be appreciate the code and make it leaner and therefor more explizit, by hiding whats not mandatory to tell and exist.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the mr, hopefully we get 3.0.0 fully released soon 👍

if (scheduler != null) {
try {
if (shutdownWaitTime.isZero()) {
Expand Down