ChangeNotes: Add special factory method for new changes
When a new change is created the Change instance must be passed into ChangeNotes, because there is no notes branch yet from which the change can be read. Add an extra factory method for this so that this case can be differentiated from instantiating ChangeNotes for existing changes. Then in a later step we can change the method signature of the factory method for existing changes to require a project name + a change ID instead of a change. Change-Id: I3adc5c5814c4201541834d25f48b50a1d886895a Signed-off-by: Edwin Kempin <ekempin@google.com>
This commit is contained in:
@@ -134,7 +134,7 @@ public class DraftCommentNotes extends AbstractChangeNotes<DraftCommentNotes> {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Project.NameKey getProjectName() {
|
||||
public Project.NameKey getProjectName() {
|
||||
return draftsProject;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user