Skip to content

Commit

Permalink
null check
Browse files Browse the repository at this point in the history
  • Loading branch information
naman.soni committed Aug 7, 2024
1 parent fb0410a commit 03248cf
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ public void doProcessResponse(ServletResponse response) {
HttpServletResponse httpServletResponse = (HttpServletResponse) response;
if (isSuccess(httpServletResponse.getStatus())) {
// 2xx response
accessLogContextBuilder.contentLength(Integer.valueOf(httpServletResponse
.getHeader(HttpHeaderNames.CONTENT_LENGTH.toString())));
accessLogContextBuilder.contentLength(httpServletResponse.getHeader(HttpHeaderNames.CONTENT_LENGTH.toString()) != null ?
Integer.valueOf(httpServletResponse.getHeader(HttpHeaderNames.CONTENT_LENGTH.toString())) : 0);
} else {
// non-2xx response
accessLogContextBuilder.contentLength(0);
Expand Down

0 comments on commit 03248cf

Please sign in to comment.