Match no labels if current patch set is not available
If the current patch set cannot be loaded from ChangeData, assume no label information. This works around an NPE inside of ChangeControl where the PatchSet is otherwise required. Change-Id: If2db5663a931cd8221de75f89e8fbd412e477818
This commit is contained in:
@@ -349,6 +349,10 @@ public class ListChanges {
|
||||
}
|
||||
|
||||
PatchSet ps = cd.currentPatchSet(db);
|
||||
if (ps == null) {
|
||||
return Collections.emptyMap();
|
||||
}
|
||||
|
||||
Map<String, LabelInfo> labels = Maps.newLinkedHashMap();
|
||||
for (SubmitRecord rec : ctl.canSubmit(db.get(), ps, cd, true, false)) {
|
||||
if (rec.labels == null) {
|
||||
|
||||
Reference in New Issue
Block a user