entities.Comment: remove legacyFormat member
Support legacy format decoding was removed in I8c6ac497 ("Remove
unused classes to read/write legacy change notes").
Change-Id: Ia3506c9b1615e6da68ecb71ac2f233f8361ab085
This commit is contained in:
@@ -229,12 +229,6 @@ public class Comment {
|
||||
public String serverId;
|
||||
public boolean unresolved;
|
||||
|
||||
/**
|
||||
* Whether the comment was parsed from a JSON representation (false) or the legacy custom notes
|
||||
* format (true).
|
||||
*/
|
||||
public transient boolean legacyFormat;
|
||||
|
||||
public Comment(Comment c) {
|
||||
this(
|
||||
new Key(c.key),
|
||||
|
||||
@@ -59,7 +59,6 @@ import com.google.inject.Provider;
|
||||
import java.sql.Timestamp;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -1002,20 +1001,6 @@ public class CommentsIT extends AbstractDaemonTest {
|
||||
assertThat(getChangeSortedComments(id.get())).hasSize(3);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void jsonCommentHasLegacyFormatFalse() throws Exception {
|
||||
PushOneCommit.Result result = createChange();
|
||||
Change.Id changeId = result.getChange().getId();
|
||||
addComment(result.getChangeId(), "comment");
|
||||
|
||||
Collection<com.google.gerrit.entities.Comment> comments =
|
||||
notesFactory.createChecked(project, changeId).getComments().values();
|
||||
assertThat(comments).hasSize(1);
|
||||
com.google.gerrit.entities.Comment comment = comments.iterator().next();
|
||||
assertThat(comment.message).isEqualTo("comment");
|
||||
assertThat(comment.legacyFormat).isFalse();
|
||||
}
|
||||
|
||||
private List<CommentInfo> getRevisionComments(String changeId, String revId) throws Exception {
|
||||
return getPublishedComments(changeId, revId).values().stream()
|
||||
.flatMap(List::stream)
|
||||
|
||||
@@ -938,7 +938,6 @@ public class ChangeNotesStateTest {
|
||||
.put("revId", String.class)
|
||||
.put("serverId", String.class)
|
||||
.put("unresolved", boolean.class)
|
||||
.put("legacyFormat", boolean.class)
|
||||
.build());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user