mirror of
https://github.com/usbharu/Hideout.git
synced 2026-07-03 04:07:53 +00:00
refactor: nullチェックをrequirenotnullに置換
This commit is contained in:
+1
-4
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user