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?, targetActor: String?,
url: String url: String
): Note { ): Note {
if (note.id == null) { requireNotNull(note.id) { "id is null" }
throw IllegalArgumentException("id is null")
// return internalNote(note, targetActor, url)
}
return try { return try {
noteQueryService.findByApid(note.id!!).first noteQueryService.findByApid(note.id!!).first