refactor: nullチェックをrequirenotnullに置換

This commit is contained in:
usbharu 2023-11-02 17:19:01 +09:00
parent 224137e3b7
commit af1a46ab9f
Signed by: usbharu
GPG Key ID: 6556747BF94EEBC8
1 changed files with 1 additions and 4 deletions

View File

@ -89,10 +89,7 @@ class APNoteServiceImpl(
targetActor: String?,
url: String
): Note {
if (note.id == null) {
throw IllegalArgumentException("id is null")
// return internalNote(note, targetActor, url)
}
requireNotNull(note.id) { "id is null" }
return try {
noteQueryService.findByApid(note.id!!).first