Adapt to RevId removal

Change-Id: I83278419a156d5e39de2f820e50c596672fc8157
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 903aa9c..daeb324 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/reviewnotes/CreateReviewNotes.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/reviewnotes/CreateReviewNotes.java
@@ -19,6 +19,7 @@
 import com.google.gerrit.common.data.LabelTypes;
 import com.google.gerrit.extensions.registration.DynamicItem;
 import com.google.gerrit.git.LockFailureException;
+import com.google.gerrit.git.ObjectIds;
 import com.google.gerrit.reviewdb.client.Change;
 import com.google.gerrit.reviewdb.client.PatchSet;
 import com.google.gerrit.reviewdb.client.PatchSetApproval;
@@ -172,9 +173,8 @@
       for (ChangeNotes cn : notes) {
         monitor.update(1);
         PatchSet ps = psUtil.current(cn);
-        ObjectId commitId = ObjectId.fromString(ps.getRevision().get());
-        RevCommit commit = rw.parseCommit(commitId);
-        getNotes().set(commitId, createNoteContent(cn, ps));
+        RevCommit commit = rw.parseCommit(ps.getCommitId());
+        getNotes().set(commit, createNoteContent(cn, ps));
         getMessage().append("* ").append(commit.getShortMessage()).append("\n");
       }
     }
@@ -238,7 +238,7 @@
     String hash = c.name();
     for (ChangeData cd : queryProvider.get().byBranchCommit(project.get(), destBranch, hash)) {
       for (PatchSet ps : cd.patchSets()) {
-        if (ps.getRevision().matches(hash)) {
+        if (ObjectIds.matchesAbbreviation(ps.getCommitId(), hash)) {
           return ps;
         }
       }