Log when notify = null during /review

The notify field should be omitted from JSON or set to one of the
supported constants. Log a warning whenever the value is null.
This message may help to identify a potential problem in the Gson
library when parsing input for /review.

Change-Id: I3678c596e9c4884dadf60781fff5352ce8690726
This commit is contained in:
Shawn Pearce 2013-05-06 09:35:40 -07:00
parent f41e408c30
commit 17ad1de434

View File

@ -132,6 +132,7 @@ public class PostReview implements RestModifyView<RevisionResource, Input> {
checkComments(input.comments);
}
if (input.notify == null) {
log.warn("notify = null; assuming notify = NONE");
input.notify = NotifyHandling.NONE;
}