JuyeoungJun / cron-monitoring

for cron-monitoring
0 stars 0 forks source link

사용자 정보 수정 500 에러 #77

Closed JuyeoungJun closed 3 years ago

JuyeoungJun commented 3 years ago

In GitLab by @gm2202981 on Jul 19, 2021, 11:47

개요

버그에 대한 설명 추가

버그 내용

2021-07-19 02:06:06.264 ERROR 1 --- [nio-8080-exec-8] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.NullPointerException] with root cause

버그 재현 코드

if (!request.getAccount().isEmpty()) {
    user.setAccount(request.getAccount());
}

해결 방안

if (request.getAccount() != null && !request.getAccount().isEmpty()) {
    user.setAccount(request.getAccount());
}
JuyeoungJun commented 3 years ago

In GitLab by @gm2202981 on Jul 19, 2021, 13:49

mentioned in merge request !58