Remove references to ApprovalCategory This was removed in Gerrit in I5df6f0c5665d0ae4ee6b5e2944f5954fa2f96b5c. Change-Id: Ied2c508dc827e4e11ac5858a1c2c84ce3ba07f4a
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 69457a9..8546bf0 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/reviewnotes/CreateReviewNotes.java +++ b/src/main/java/com/googlesource/gerrit/plugins/reviewnotes/CreateReviewNotes.java
@@ -38,7 +38,6 @@ import com.google.gerrit.common.data.LabelType; import com.google.gerrit.common.data.LabelTypes; -import com.google.gerrit.reviewdb.client.ApprovalCategory; import com.google.gerrit.reviewdb.client.Change; import com.google.gerrit.reviewdb.client.PatchSet; import com.google.gerrit.reviewdb.client.PatchSetApproval; @@ -219,10 +218,10 @@ for (PatchSetApproval a : approvals) { if (a.getValue() == 0) { // Ignore 0 values. - } else if (ApprovalCategory.SUBMIT.equals(a.getCategoryId())) { + } else if (a.isSubmit()) { submit = a; } else { - LabelType type = labelTypes.byId(a.getCategoryId().get()); + LabelType type = labelTypes.byLabel(a.getLabelId()); if (type != null) { fmt.appendApproval(type, a.getValue(), accountCache.get(a.getAccountId()).getAccount());