PostReview: Fix NPE on file level comments
The line member is optional and can be null for file level comments. Change-Id: I77772b6f80772d5161eaa7db278ffc80c3560056
This commit is contained in:
@@ -317,7 +317,7 @@ public class PostReview implements RestModifyView<RevisionResource, ReviewInput>
|
||||
listItr.remove();
|
||||
continue;
|
||||
}
|
||||
if (c.line < 0) {
|
||||
if (c.line != null && c.line < 0) {
|
||||
throw new BadRequestException(String.format(
|
||||
"negative line number %d not allowed on %s",
|
||||
c.line, path));
|
||||
|
||||
Reference in New Issue
Block a user