File tree Expand file tree Collapse file tree
main/java/org/springframework/scheduling/support
test/java/org/springframework/scheduling/support Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1919import java .time .Instant ;
2020import java .time .ZoneId ;
2121import java .time .ZonedDateTime ;
22+ import java .util .Objects ;
2223import java .util .TimeZone ;
2324
2425import org .jspecify .annotations .Nullable ;
2526
2627import org .springframework .scheduling .Trigger ;
2728import org .springframework .scheduling .TriggerContext ;
2829import org .springframework .util .Assert ;
29- import org .springframework .util .ObjectUtils ;
3030
3131/**
3232 * {@link Trigger} implementation for cron expressions. Wraps a
@@ -147,12 +147,12 @@ Instant determineInitialTimestamp(TriggerContext triggerContext) {
147147 public boolean equals (@ Nullable Object other ) {
148148 return (this == other || (other instanceof CronTrigger that &&
149149 this .expression .equals (that .expression ) &&
150- ObjectUtils . nullSafeEquals (this .zoneId , that .zoneId )));
150+ Objects . equals (this .zoneId , that .zoneId )));
151151 }
152152
153153 @ Override
154154 public int hashCode () {
155- return ObjectUtils . nullSafeHash (this .expression , this .zoneId );
155+ return Objects . hash (this .expression , this .zoneId );
156156 }
157157
158158 @ Override
Original file line number Diff line number Diff line change @@ -748,7 +748,7 @@ void daylightSavingMissingHour() {
748748 }
749749
750750 @ Test
751- void equalsAndHashCodeConsidersZoneId () {
751+ void equalsAndHashCodeConsiderZoneId () {
752752 String cron = "0 0 9 * * *" ;
753753 CronTrigger amsterdam = new CronTrigger (cron , ZoneId .of ("Europe/Amsterdam" ));
754754 CronTrigger newYork = new CronTrigger (cron , ZoneId .of ("America/New_York" ));
You can’t perform that action at this time.
0 commit comments