Merge "Remove ChangeControl.GenericFactory#validateFor() and migrate callers"

This commit is contained in:
David Pursehouse
2017-08-23 23:31:17 +00:00
committed by Gerrit Code Review
2 changed files with 24 additions and 33 deletions

View File

@@ -95,20 +95,6 @@ public class ChangeControl {
throw new NoSuchChangeException(notes.getChangeId(), e);
}
}
public ChangeControl validateFor(ReviewDb db, Change.Id changeId, CurrentUser user)
throws OrmException {
return validateFor(db, notesFactory.createChecked(changeId), user);
}
public ChangeControl validateFor(ReviewDb db, ChangeNotes notes, CurrentUser user)
throws OrmException {
ChangeControl c = controlFor(notes, user);
if (!c.isVisible(db)) {
throw new NoSuchChangeException(c.getId());
}
return c;
}
}
@Singleton