RestApiServlet: Do not use HttpServletResponse#getStatus() The version of HttpServletResponse that is used at Google doesn't have this method. The usage of this method was introduced by change If6fd0b543. Signed-off-by: Edwin Kempin <ekempin@google.com> Change-Id: I9035f2a7e874fe5341eae5a43a9d5e4cfe0dae08
diff --git a/java/com/google/gerrit/httpd/restapi/RestApiServlet.java b/java/com/google/gerrit/httpd/restapi/RestApiServlet.java index cca4f69..f30fefa7 100644 --- a/java/com/google/gerrit/httpd/restapi/RestApiServlet.java +++ b/java/com/google/gerrit/httpd/restapi/RestApiServlet.java
@@ -685,12 +685,11 @@ responseBytes = 0; if (statusCode == SC_INTERNAL_SERVER_ERROR) { logger.atSevere().withCause(e).log( - "Error in %s %s, response already committed with status %d", - req.getMethod(), uriForLogging(req), res.getStatus()); + "Error in %s %s, response already committed", req.getMethod(), uriForLogging(req)); } else { logger.atWarning().log( - "Response for %s %s already committed with status %d, wanted to set status %d", - req.getMethod(), uriForLogging(req), res.getStatus(), statusCode); + "Response for %s %s already committed, wanted to set status %d", + req.getMethod(), uriForLogging(req), statusCode); } } else { res.reset();