Handle null input in set wip/ready REST endpoints
PolyGerrit may send no input in the request body, while with the GWT UI we normally get an empty input object. Change-Id: Ie148961e68a41cad57574983d2a2e0c66ae6f170 Signed-off-by: Edwin Kempin <ekempin@google.com>
This commit is contained in:
@@ -61,7 +61,7 @@ public class WorkInProgressOp implements BatchUpdateOp {
|
|||||||
StringBuilder buf =
|
StringBuilder buf =
|
||||||
new StringBuilder(c.isWorkInProgress() ? "Set Work In Progress" : "Set Ready For Review");
|
new StringBuilder(c.isWorkInProgress() ? "Set Work In Progress" : "Set Ready For Review");
|
||||||
|
|
||||||
String m = Strings.nullToEmpty(in.message).trim();
|
String m = in != null ? Strings.nullToEmpty(in.message).trim() : "";
|
||||||
if (!m.isEmpty()) {
|
if (!m.isEmpty()) {
|
||||||
buf.append("\n\n");
|
buf.append("\n\n");
|
||||||
buf.append(m);
|
buf.append(m);
|
||||||
|
|||||||
Reference in New Issue
Block a user