Merge "Assign ImmutableList type to ImmutableList instead of generic List"
This commit is contained in:
@@ -2045,7 +2045,7 @@ class ReceiveCommits {
|
|||||||
: CommentType.FILE_COMMENT,
|
: CommentType.FILE_COMMENT,
|
||||||
comment.message))
|
comment.message))
|
||||||
.collect(toImmutableList());
|
.collect(toImmutableList());
|
||||||
List<CommentValidationFailure> commentValidationFailures =
|
ImmutableList<CommentValidationFailure> commentValidationFailures =
|
||||||
PublishCommentUtil.findInvalidComments(commentValidators, draftsForValidation);
|
PublishCommentUtil.findInvalidComments(commentValidators, draftsForValidation);
|
||||||
magicBranch.setCommentsValid(commentValidationFailures.isEmpty());
|
magicBranch.setCommentsValid(commentValidationFailures.isEmpty());
|
||||||
commentValidationFailures.forEach(
|
commentValidationFailures.forEach(
|
||||||
|
@@ -285,7 +285,7 @@ public class MailProcessor {
|
|||||||
MAIL_COMMENT_TYPE_TO_VALIDATION_TYPE.get(comment.getType()),
|
MAIL_COMMENT_TYPE_TO_VALIDATION_TYPE.get(comment.getType()),
|
||||||
comment.getMessage()))
|
comment.getMessage()))
|
||||||
.collect(ImmutableList.toImmutableList());
|
.collect(ImmutableList.toImmutableList());
|
||||||
List<CommentValidationFailure> commentValidationFailures =
|
ImmutableList<CommentValidationFailure> commentValidationFailures =
|
||||||
PublishCommentUtil.findInvalidComments(commentValidators, parsedCommentsForValidation);
|
PublishCommentUtil.findInvalidComments(commentValidators, parsedCommentsForValidation);
|
||||||
if (!commentValidationFailures.isEmpty()) {
|
if (!commentValidationFailures.isEmpty()) {
|
||||||
sendRejectionEmail(message, InboundEmailRejectionSender.Error.COMMENT_REJECTED);
|
sendRejectionEmail(message, InboundEmailRejectionSender.Error.COMMENT_REJECTED);
|
||||||
|
@@ -995,7 +995,7 @@ public class PostReview
|
|||||||
: CommentType.FILE_COMMENT,
|
: CommentType.FILE_COMMENT,
|
||||||
comment.message))
|
comment.message))
|
||||||
.collect(toImmutableList());
|
.collect(toImmutableList());
|
||||||
List<CommentValidationFailure> draftValidationFailures =
|
ImmutableList<CommentValidationFailure> draftValidationFailures =
|
||||||
PublishCommentUtil.findInvalidComments(commentValidators, draftsForValidation);
|
PublishCommentUtil.findInvalidComments(commentValidators, draftsForValidation);
|
||||||
if (!draftValidationFailures.isEmpty()) {
|
if (!draftValidationFailures.isEmpty()) {
|
||||||
throw new CommentsRejectedException(draftValidationFailures);
|
throw new CommentsRejectedException(draftValidationFailures);
|
||||||
@@ -1385,7 +1385,7 @@ public class PostReview
|
|||||||
buf.append(String.format("\n\n(%d comments)", comments.size()));
|
buf.append(String.format("\n\n(%d comments)", comments.size()));
|
||||||
}
|
}
|
||||||
if (!msg.isEmpty()) {
|
if (!msg.isEmpty()) {
|
||||||
List<CommentValidationFailure> messageValidationFailure =
|
ImmutableList<CommentValidationFailure> messageValidationFailure =
|
||||||
PublishCommentUtil.findInvalidComments(
|
PublishCommentUtil.findInvalidComments(
|
||||||
commentValidators,
|
commentValidators,
|
||||||
ImmutableList.of(
|
ImmutableList.of(
|
||||||
|
Reference in New Issue
Block a user