Rework SUBM label in LabelId

Use a static method instead of a public LabelId field. LabelId is
mutable, so naming it like a constant is misleading at best. At worst,
a caller could call SUBMIT.set(newValue) and change the value seen by
all callers in the process. (Fortunately no callers were doing this as
far as I could tell.)

While we're in there, rename methods to refer to this as a "legacy"
submit label, as we want to eventually get rid of it in NoteDb.

Change-Id: Id7fbddfaac1d625839c66c73231d4e4ba2550c50
This commit is contained in:
Dave Borowitz
2016-03-08 10:01:49 -08:00
parent 6df8475ac5
commit 79ecc14466
14 changed files with 20 additions and 16 deletions

View File

@@ -611,7 +611,7 @@ public class PostReview implements RestModifyView<RevisionResource, ReviewInput>
for (PatchSetApproval a : approvalsUtil.byPatchSetUser(
ctx.getDb(), ctx.getControl(), psId, user.getAccountId())) {
if (a.isSubmit()) {
if (a.isLegacySubmit()) {
continue;
}