Refactor byChange() into two methods: drafts and published
Callers of the PatchLineCommentUtils.byChange() mostly just want either the published comments or the drafts comments. For that reason, I refactored this method into two pieces and updated its callers. I modified ChangeData.comments() to be ChangeData.publishedComments() in order to more accurately the contents of the returned list. Change-Id: I4222b894896af1ae635fd8c390fe014db9f6778d
This commit is contained in:
@@ -408,7 +408,7 @@ public class ChangeField {
|
||||
public Iterable<String> get(ChangeData input, FillArgs args)
|
||||
throws OrmException {
|
||||
Set<String> r = Sets.newHashSet();
|
||||
for (PatchLineComment c : input.comments()) {
|
||||
for (PatchLineComment c : input.publishedComments()) {
|
||||
r.add(c.getMessage());
|
||||
}
|
||||
for (ChangeMessage m : input.messages()) {
|
||||
|
||||
Reference in New Issue
Block a user