ChangeNotesState: Remove redundant revertOf field
This is a @Column in Change and thus belongs in ChangeColumns. In ChangeNotes#create it reuses the same value in both places, so they should always be equal, modulo missing ChangeColumns, in which case the field in ChangeNotesState should never be accessed. Change-Id: I63eb5acdcd6c47ea2ceea7d830d5b5b6e4b28d2f
This commit is contained in:
@@ -679,7 +679,7 @@ public class ChangeNotes extends AbstractChangeNotes<ChangeNotes> {
|
||||
}
|
||||
|
||||
public Change.Id getRevertOf() {
|
||||
return state.revertOf();
|
||||
return state.columns().revertOf();
|
||||
}
|
||||
|
||||
public boolean hasReviewStarted() {
|
||||
|
@@ -75,7 +75,6 @@ public abstract class ChangeNotesState {
|
||||
ImmutableList.of(),
|
||||
ImmutableListMultimap.of(),
|
||||
ImmutableListMultimap.of(),
|
||||
null,
|
||||
null);
|
||||
}
|
||||
|
||||
@@ -147,8 +146,7 @@ public abstract class ChangeNotesState {
|
||||
ImmutableList.copyOf(allChangeMessages),
|
||||
ImmutableListMultimap.copyOf(changeMessagesByPatchSet),
|
||||
ImmutableListMultimap.copyOf(publishedComments),
|
||||
readOnlyUntil,
|
||||
revertOf);
|
||||
readOnlyUntil);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -244,9 +242,6 @@ public abstract class ChangeNotesState {
|
||||
@Nullable
|
||||
abstract Timestamp readOnlyUntil();
|
||||
|
||||
@Nullable
|
||||
abstract Change.Id revertOf();
|
||||
|
||||
Change newChange(Project.NameKey project) {
|
||||
ChangeColumns c = checkNotNull(columns(), "columns are required");
|
||||
Change change =
|
||||
|
Reference in New Issue
Block a user