Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge: (#772) RequestBody Int 필드 nullcheck 안되는 오류 해결 #773

Merged
merged 2 commits into from
Oct 3, 2024

Conversation

zios0707
Copy link
Collaborator

@zios0707 zios0707 commented Sep 27, 2024

작업 내용 설명

  • Int 필드 nullable로 변경

주요 변경 사항

결과물

image

체크리스트

  • 어플리케이션 구동(혹은 테스트)시 오류는 없나요?
  • 생성된 코드에 Javadoc 주석을 추가 하였나요?
  • 생성된 코드에 대한 테스트 코드가 작성 되었나요?

관련 이슈

@zios0707 zios0707 self-assigned this Sep 27, 2024
@zios0707 zios0707 linked an issue Sep 27, 2024 that may be closed by this pull request
1 task
Copy link

codecov bot commented Sep 27, 2024

Codecov Report

Attention: Patch coverage is 0% with 12 lines in your changes missing coverage. Please review.

Project coverage is 3.15%. Comparing base (93c2b35) to head (ea57ef1).
Report is 3 commits behind head on develop.

Files with missing lines Patch % Lines
...aliens/dms/domain/volunteer/VolunteerWebAdapter.kt 0.00% 6 Missing ⚠️
...volunteer/dto/request/CreateVolunteerWebRequest.kt 0.00% 3 Missing ⚠️
...volunteer/dto/request/UpdateVolunteerWebRequest.kt 0.00% 3 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##             develop    #773   +/-   ##
=========================================
  Coverage       3.15%   3.15%           
  Complexity        85      85           
=========================================
  Files            653     653           
  Lines           9137    9137           
  Branches         212     212           
=========================================
  Hits             288     288           
  Misses          8840    8840           
  Partials           9       9           
Flag Coverage Δ
?

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...volunteer/dto/request/CreateVolunteerWebRequest.kt 0.00% <0.00%> (ø)
...volunteer/dto/request/UpdateVolunteerWebRequest.kt 0.00% <0.00%> (ø)
...aliens/dms/domain/volunteer/VolunteerWebAdapter.kt 0.00% <0.00%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 93c2b35...ea57ef1. Read the comment docs.

@zios0707 zios0707 changed the title merge: (#769) RequestBody Int 필드 nullable 로 변경 merge: (#772) RequestBody Int 필드 nullable 로 변경 Sep 27, 2024
@4mjeo
Copy link
Member

4mjeo commented Sep 30, 2024

점수랑 최대 봉사 신청자 수가 null이어도 되나요?

@zios0707
Copy link
Collaborator Author

zios0707 commented Sep 30, 2024

점수랑 최대 봉사 신청자 수가 null이어도 되나요?

아 그 Kotlin 에서는 기본 Int형이 참조형인줄 알았는데 비참조타입이라서 NULL을 주게되면 DTO가 생성되면서 기본 값이 0이 들어가더라구요 그래서 @Valid의 Nullcheck가 안되고 그대로 0이 들어가지는 이슈가 있었습니다.

그래서 Int 필드를 Nullable로 변경해야 @Valid에서 Nullcheck가 진행되어 해결할 수 있게 되었습니다

@zios0707 zios0707 changed the title merge: (#772) RequestBody Int 필드 nullable 로 변경 merge: (#772) RequestBody Int 필드 nullcheck 안되는 오류 해결 Sep 30, 2024
Copy link

sonarcloud bot commented Oct 3, 2024

@zios0707 zios0707 merged commit b82efef into develop Oct 3, 2024
3 checks passed
@zios0707 zios0707 deleted the fix/772-request-body-int branch October 3, 2024 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

봉사 Request Body Int 타입 기본값이 0 해결
2 participants