Copy labels dynamically in ApprovalsUtil.byPatchSet
The intent is to use this method from ChangeJson to dynamically copy labels every time the change detail is loaded, thus not relying on one-time copying of labels in the notedb read path. To do so requires a bit of refactoring, since the ChangeControl now needs to be passed into this method. Change-Id: I8bc25d32a91218e074517dcacf4bf3a77d4ae957
This commit is contained in:
@@ -88,7 +88,6 @@ import com.google.gerrit.server.patch.PatchListNotAvailableException;
|
||||
import com.google.gerrit.server.patch.PatchSetInfoFactory;
|
||||
import com.google.gerrit.server.patch.PatchSetInfoNotAvailableException;
|
||||
import com.google.gerrit.server.project.ChangeControl;
|
||||
import com.google.gerrit.server.project.NoSuchChangeException;
|
||||
import com.google.gerrit.server.project.NoSuchProjectException;
|
||||
import com.google.gerrit.server.project.ProjectControl;
|
||||
import com.google.gerrit.server.query.change.ChangeData;
|
||||
@@ -370,7 +369,7 @@ public class ChangeJson {
|
||||
ctrl = projectControls.get(cd.change().getProject())
|
||||
.controlFor(cd.change());
|
||||
}
|
||||
} catch (NoSuchChangeException | ExecutionException e) {
|
||||
} catch (ExecutionException e) {
|
||||
throw new OrmException(e);
|
||||
}
|
||||
lastControl = ctrl;
|
||||
|
||||
Reference in New Issue
Block a user