ChangeJson: Fix reviewed property initialization

ChangeJson.reviewed property was not always initialized even though REVIEWED
option was provided. This breaks plugin API.

Change-Id: Ibe1cd1651d981424bcc7502a87b1f35308ba8828
This commit is contained in:
David Ostrovsky
2014-02-02 12:54:35 +01:00
parent 0eca733594
commit 5b269c3c25

View File

@@ -226,6 +226,9 @@ public class ChangeJson {
private ChangeInfo format(ChangeData cd, Optional<PatchSet.Id> limitToPsId)
throws OrmException {
accountLoader = accountLoaderFactory.create(has(DETAILED_ACCOUNTS));
if (has(REVIEWED)) {
ensureReviewedLoaded(Collections.singleton(cd));
}
ChangeInfo res = toChangeInfo(cd, limitToPsId);
accountLoader.fill();
return res;