commit | 00b8648848eae125af19f82d0f2a9b7535665b29 | [log] [tgz] |
---|---|---|
author | David Pursehouse <dpursehouse@digital.ai> | Mon Apr 20 20:23:09 2020 +0900 |
committer | David Pursehouse <dpursehouse@digital.ai> | Mon Apr 20 21:34:07 2020 +0900 |
tree | accfb3fcbd3a71493f35bb77cbe639d91449f5ea | |
parent | 5e7b1532ac202e36585e20fee38ce2c457314440 [diff] |
ReplicationQueue: Add handling of null ReplicationTasksStorage.ReplicateRefUpdate This was originally done in change I72f34d8de but got lost in the merge from stable-2.15 to stable-2.16 in change Icc855dd26. Change-Id: Iea4d6e80f64d84b9c13a9fb1792e84fec808a237
diff --git a/src/main/java/com/googlesource/gerrit/plugins/replication/ReplicationQueue.java b/src/main/java/com/googlesource/gerrit/plugins/replication/ReplicationQueue.java index ca8001a..4a59d70 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/replication/ReplicationQueue.java +++ b/src/main/java/com/googlesource/gerrit/plugins/replication/ReplicationQueue.java
@@ -196,6 +196,10 @@ Set<String> eventsReplayed = new HashSet<>(); replaying = true; for (ReplicationTasksStorage.ReplicateRefUpdate t : replicationTasksStorage.list()) { + if (t == null) { + repLog.atWarning().log("Encountered null replication event in ReplicationTasksStorage"); + continue; + } String eventKey = String.format("%s:%s", t.project, t.ref); if (!eventsReplayed.contains(eventKey)) { repLog.atInfo().log("Firing pending task %s", eventKey);