commit | a28ae590486934690e4e0a95d7eb75f8b60644a6 | [log] [tgz] |
---|---|---|
author | Patrick Hiesel <hiesel@google.com> | Wed Jul 21 14:19:11 2021 +0200 |
committer | Patrick Hiesel <hiesel@google.com> | Wed Jul 21 14:19:11 2021 +0200 |
tree | 4fb69b3d66bd645f732e19cc70de11d67138e7d7 | |
parent | 35e6449a517691a880c94e7467bc07360f8e6666 [diff] |
Adapt to change in Gerrit core Change-Id: I52ed6e72dde828cb4d90dea2e4479c45d7597d21
diff --git a/src/main/java/com/googlesource/gerrit/plugins/reviewnotes/CreateReviewNotes.java b/src/main/java/com/googlesource/gerrit/plugins/reviewnotes/CreateReviewNotes.java index cae071a..2ccf33b 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/reviewnotes/CreateReviewNotes.java +++ b/src/main/java/com/googlesource/gerrit/plugins/reviewnotes/CreateReviewNotes.java
@@ -264,10 +264,10 @@ } else if (a.isLegacySubmit()) { submit = a; } else { - LabelType type = labelTypes.byLabel(a.labelId()); - if (type != null) { + Optional<LabelType> type = labelTypes.byLabel(a.labelId()); + if (type.isPresent()) { fmt.appendApproval( - type, + type.get(), a.value(), a.accountId(), accountCache.get(a.accountId()).map(AccountState::account));