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:
Edwin Kempin
2016-01-29 14:37:34 +01:00
parent 1523e7d3bf
commit 416dd77400
6 changed files with 28 additions and 4 deletions

View File

@@ -134,7 +134,7 @@ public class DraftCommentNotes extends AbstractChangeNotes<DraftCommentNotes> {
}
@Override
protected Project.NameKey getProjectName() {
public Project.NameKey getProjectName() {
return draftsProject;
}
}