Factor setPatchSetId out of ChangeUpdate
I missed this when factoring out AbstractChangeUpdate from ChangeUpdate. Change-Id: If6eb57fa1a2ed9b37061bdca2fcde200ef034329
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
|
||||
package com.google.gerrit.server.notedb;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkArgument;
|
||||
import static com.google.gerrit.server.notedb.ChangeNoteUtil.GERRIT_PLACEHOLDER_HOST;
|
||||
|
||||
import com.google.gerrit.reviewdb.client.Account;
|
||||
@@ -70,6 +71,12 @@ public abstract class AbstractChangeUpdate extends VersionedMetaData {
|
||||
return (IdentifiedUser) ctl.getCurrentUser();
|
||||
}
|
||||
|
||||
public void setPatchSetId(PatchSet.Id psId) {
|
||||
checkArgument(psId == null
|
||||
|| psId.getParentKey().equals(getChange().getId()));
|
||||
this.psId = psId;
|
||||
}
|
||||
|
||||
private void load() throws IOException {
|
||||
if (migration.write() && getRevision() == null) {
|
||||
Repository repo = repoManager.openRepository(getProjectName());
|
||||
|
@@ -170,12 +170,6 @@ public class ChangeUpdate extends AbstractChangeUpdate {
|
||||
this.subject = subject;
|
||||
}
|
||||
|
||||
public void setPatchSetId(PatchSet.Id psId) {
|
||||
checkArgument(psId == null
|
||||
|| psId.getParentKey().equals(getChange().getId()));
|
||||
this.psId = psId;
|
||||
}
|
||||
|
||||
public void setChangeMessage(String changeMessage) {
|
||||
this.changeMessage = changeMessage;
|
||||
}
|
||||
|
Reference in New Issue
Block a user