Skip to content

Commit

Permalink
[hotfix][runtime] Adds missing @GuardedBy annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
XComp committed Nov 27, 2024
1 parent e64b2fd commit 7c6a641
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import org.apache.flink.util.Preconditions;

import javax.annotation.Nullable;
import javax.annotation.concurrent.GuardedBy;

import java.util.UUID;

Expand All @@ -34,7 +35,10 @@ public class StandaloneLeaderElection implements LeaderElection {
private final Object lock = new Object();

private final UUID sessionID;
@Nullable private LeaderContender leaderContender;

@GuardedBy("lock")
@Nullable
private LeaderContender leaderContender;

public StandaloneLeaderElection(UUID sessionID) {
this.sessionID = sessionID;
Expand Down

0 comments on commit 7c6a641

Please sign in to comment.