Add #getName() and #getNameKey() to ProjectState
This commit adds #getName() and #getNameKey() to ProjectState and migrates callers to spare calling #getProject() in many places. Change-Id: I124d370b47723ff3fc7d5bc51a697890a16ab01c
This commit is contained in:
@@ -69,8 +69,7 @@ public abstract class AbstractGitCommand extends BaseCommand {
|
||||
|
||||
@Override
|
||||
public Project.NameKey getProjectName() {
|
||||
Project project = projectControl.getProjectState().getProject();
|
||||
return project.getNameKey();
|
||||
return projectControl.getProjectState().getNameKey();
|
||||
}
|
||||
});
|
||||
} finally {
|
||||
|
||||
@@ -226,6 +226,6 @@ final class AdminSetParent extends SshCommand {
|
||||
if (ps == null) {
|
||||
return Collections.emptySet();
|
||||
}
|
||||
return ps.parents().transform(s -> s.getProject().getNameKey()).toSet();
|
||||
return ps.parents().transform(s -> s.getNameKey()).toSet();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user