CommitResource: Delegate to ProjectResource
Other child resources, such as RevisionResource, use delegation rather than inheritance to refer to their parent collections. This allows us to use more sensibly named methods; for example, it is not obvious that what myCommitResource.getNameKey() is referring to is actually the project name key. Change-Id: I2aa58246afd22ef7bd0f437c6cfe7233b825f976
This commit is contained in:
@@ -40,7 +40,7 @@ public class FilesInCommitCollection implements
|
||||
@Override
|
||||
public FileResource parse(CommitResource parent, IdString id)
|
||||
throws ResourceNotFoundException {
|
||||
return new FileResource(parent.getNameKey(), parent.getCommit().getName(),
|
||||
return new FileResource(parent.getProject(), parent.getCommit().getName(),
|
||||
id.get());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user