Skip to content

Commit

Permalink
[private-bamoe-issues#1326] Avoid duplicate timer execution with long…
Browse files Browse the repository at this point in the history
… running timers and async nodes (#2373) (#2376)

* [private-bamoe-issues#1326] Avoid duplicate timer execution with long running timers and async nodes

* [private-bamoe-issues#1326] Simplify the equals/hashCode methods

Co-authored-by: Martin Weiler <mweiler@redhat.com>
  • Loading branch information
github-actions[bot] and martinweiler committed Jan 18, 2024
1 parent 98b6811 commit dd53fc1
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,20 @@ public String getUuid() {
return null;
}

@Override
public int hashCode() {
return (int)getId();
}

@Override
public boolean equals(Object obj) {
if ( this == obj ) return true;
if (obj == null || !obj.getClass().equals(getClass())) {
return false;
}
return getId() == ((DefaultJobHandle)obj).getId();
}

}

public static class DisposableCommandService implements InternalLocalRunner {
Expand Down

0 comments on commit dd53fc1

Please sign in to comment.