davsclaus commented on code in PR #24670:
URL: https://github.com/apache/camel/pull/24670#discussion_r3577458387


##########
components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzEndpoint.java:
##########
@@ -352,6 +355,13 @@ private void removeJobInScheduler() throws Exception {
                 scheduler.unscheduleJob(triggerKey);
 
                 jobAdded.set(false);
+                if (ObjectHelper.isNotEmpty(customCalendar)) {
+                    try {
+                        scheduler.deleteCalendar(customCalendarName());
+                    } catch (SchedulerException e) {
+                        LOG.error("Could not delete calendar {}: {}", 
customCalendarName(), e.getMessage());

Review Comment:
   Minor: consider `LOG.warn` here instead of `LOG.error` — this is a cleanup 
failure during shutdown, not a runtime error. Also, passing the exception as 
the last arg captures the stack trace:
   
   ```suggestion
                       } catch (SchedulerException e) {
                           LOG.warn("Could not delete calendar {}: {}", 
customCalendarName(), e.getMessage(), e);
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to