quartz-scheduler / quartz

Code for Quartz Scheduler
http://www.quartz-scheduler.org
Apache License 2.0
6.31k stars 1.94k forks source link

Redundant check #1209

Closed e210 closed 1 month ago

e210 commented 1 month ago

https://github.com/quartz-scheduler/quartz/blob/199c8f1111f2034f208300a8f9b372a9f37cf74f/quartz/src/main/java/org/quartz/impl/triggers/DailyTimeIntervalTriggerImpl.java#L875-L882

You have two checks that verify whether daysOfWeek is null or empty, but the second check (else if(daysOfWeek.isEmpty())) is redundant because you've already checked for the same condition in the previous line.

jhouserizer commented 1 month ago

Well, one has to be sure. :D

melloware commented 1 month ago

PR submitted

bcode2 commented 1 month ago

there is a conversation exactly about this https://github.com/quartz-scheduler/quartz/pull/1206#discussion_r1803349355

jhouserizer commented 1 month ago

Fixed with #1211