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

This commit is contained in:
usbharu 2023-11-02 17:19:01 +09:00
parent 64ca262343
commit 4a25c4290e
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